Migrate link and tag components
This commit is contained in:
parent
79daad993e
commit
d420097a88
11 changed files with 93 additions and 54 deletions
17
src/app/components/link.rs
Normal file
17
src/app/components/link.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
use leptos::*;
|
||||
use leptos_icons::FiIcon::FiExternalLink;
|
||||
use leptos_icons::*;
|
||||
|
||||
#[component]
|
||||
pub fn Link(
|
||||
#[prop[optional]]
|
||||
url: String,
|
||||
children: Children
|
||||
) -> impl IntoView {
|
||||
view! {
|
||||
<a class="flex gap-1 font-semibold italic" href={url} target="_blank">
|
||||
{ children() }
|
||||
<i class="flex items-center"><Icon icon=Icon::from(FiExternalLink) class="scale-75" /></i>
|
||||
</a>
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue