27 lines
No EOL
523 B
Rust
27 lines
No EOL
523 B
Rust
use leptos::*;
|
|
|
|
#[component]
|
|
pub fn SocialLinkContainer(
|
|
children: Children
|
|
) -> impl IntoView {
|
|
view! {
|
|
<div class="social_links">
|
|
{ children() }
|
|
</div>
|
|
}
|
|
}
|
|
|
|
#[component]
|
|
pub fn SocialLink(
|
|
children: Children,
|
|
#[prop(optional)]
|
|
url: Option<String>,
|
|
icon: icondata::Icon,
|
|
) -> impl IntoView {
|
|
view! {
|
|
<a class="social_link" href=url target="_blank">
|
|
<leptos_icons::Icon icon=icon />
|
|
<span>{ children() }</span>
|
|
</a>
|
|
}
|
|
} |