Migrate social_link components
This commit is contained in:
parent
d420097a88
commit
35d4878bb7
6 changed files with 37 additions and 48 deletions
27
src/app/components/social_link.rs
Normal file
27
src/app/components/social_link.rs
Normal file
|
@ -0,0 +1,27 @@
|
|||
use leptos::*;
|
||||
use leptos_icons::*;
|
||||
|
||||
#[component]
|
||||
pub fn SocialLinkContainer(
|
||||
children: Children
|
||||
) -> impl IntoView {
|
||||
view! {
|
||||
<div class="flex gap-5 justify-center flex-wrap my-5">
|
||||
{ children() }
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn SocialLink(
|
||||
children: Children,
|
||||
url: String,
|
||||
icon: Icon,
|
||||
) -> impl IntoView {
|
||||
view! {
|
||||
<a class="mx-auto scale-150 mb-1" href=url target="_blank">
|
||||
<Icon icon=icon class="mx-auto scale-150 mb-1" />
|
||||
<span class="text-sm">{ children() }</span>
|
||||
</a>
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue