email_components/components/link.rs
1use yew::{AttrValue, Html, Properties, function_component, html};
2
3#[derive(Properties, PartialEq)]
4pub struct Props {
5 #[prop_or(AttrValue::Static("_blank"))]
6 pub target: AttrValue,
7
8 pub children: Html,
9}
10
11#[function_component]
12pub fn Link(props: &Props) -> Html {
13 let Props { target, children } = props;
14
15 html! {
16 <a style="color: #067df7; text-decoration-line: none" target={target}>
17 { children.clone() }
18 </a>
19 }
20}