email_components/components/
email_html.rs

1use yew::{AttrValue, Properties, function_component};
2
3#[derive(Properties, PartialEq)]
4pub struct Props {
5    #[prop_or(AttrValue::Static("en"))]
6    pub lang: AttrValue,
7    #[prop_or(AttrValue::Static("ltr"))]
8    pub dir: AttrValue,
9
10    pub children: yew::Html,
11}
12
13#[function_component]
14pub fn EmailHtml(props: &Props) -> yew::Html {
15    let Props {
16        lang,
17        dir,
18        children,
19    } = props;
20
21    yew::html! { <html lang={lang} dir={dir}>{ children.clone() }</html> }
22}