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