diff --git a/demo/src/app.rs b/demo/src/app.rs index c7f4575..1ab9c20 100644 --- a/demo/src/app.rs +++ b/demo/src/app.rs @@ -16,9 +16,10 @@ pub fn App() -> impl IntoView { provide_meta_context(); // let (read_theme, _, _) = use_local_storage::("theme"); // let theme = RwSignal::new(Theme::from(read_theme.get_untracked())); + let dir = RwSignal::new(ConfigDirection::Ltr); view! { - + diff --git a/demo/src/components/site_header.rs b/demo/src/components/site_header.rs index ecdf7b7..8951741 100644 --- a/demo/src/components/site_header.rs +++ b/demo/src/components/site_header.rs @@ -9,6 +9,7 @@ use thaw::*; pub fn SiteHeader() -> impl IntoView { let navigate = use_navigate(); let navigate_signal = RwSignal::new(use_navigate()); + let dir = ConfigInjection::expect_context().dir; let theme = Theme::use_rw_theme(); let theme_name = Memo::new(move |_| { theme.with(|theme| { @@ -221,6 +222,32 @@ pub fn SiteHeader() -> impl IntoView { > {move || theme_name.get()} +