use leptos::*; use leptos_router::use_navigate; use thaw::*; #[component] pub fn SiteHeader() -> impl IntoView { let theme = use_rw_theme(); let theme_name = create_memo(move |_| { theme.with(|theme| { if theme.name == "light".to_string() { "Dark" } else { "Light" } }) }); let on_theme = move |_| { if theme_name.get_untracked() == "Light" { theme.set(Theme::light()) } else { theme.set(Theme::dark()) } }; let style = create_memo(move |_| { theme.with(|theme| { format!("height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid {}", theme.common.border_color) }) }); view! {
"Thaw UI"
} }