diff --git a/app/index.html b/app/index.html index fd3c830..d99c083 100644 --- a/app/index.html +++ b/app/index.html @@ -34,6 +34,11 @@ + diff --git a/app/index_local.html b/app/index_local.html index e6c59eb..59f0955 100644 --- a/app/index_local.html +++ b/app/index_local.html @@ -31,6 +31,11 @@ + diff --git a/app/src/components/app.rs b/app/src/components/app.rs index 0de9bb4..848c7a3 100644 --- a/app/src/components/app.rs +++ b/app/src/components/app.rs @@ -34,6 +34,19 @@ use wasm_bindgen::prelude::*; extern "C" { #[wasm_bindgen(js_namespace = darkmode)] fn toggleDarkMode(doSave: bool); + + #[wasm_bindgen] + fn inDarkMode() -> bool; +} + +#[function_component(DarkModeToggle)] +pub fn dark_mode_toggle() -> Html { + html! { +