use leptos::*;

#[component]
pub fn Link(
    #[prop(optional)]
    url: Option<String>,
    children: Children
) -> impl IntoView {
    view! {
        <a class="link" href={url} target="_blank">
            { children() }
            <i><leptos_icons::Icon icon=icondata::FiExternalLink /></i>
        </a>
    }
}