1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-12-23 23:51:23 +00:00

Fix dark mode toggle

This commit is contained in:
Felix Ableitner 2024-11-07 13:01:56 +01:00
parent 2fd3999341
commit 1931c53ac5

View file

@ -126,7 +126,13 @@ pub fn Nav() -> impl IntoView {
<input
type="checkbox"
class="toggle"
checked=move || { expect_context::<Darkmode>().is_dark() }
checked=move || {
if expect_context::<Darkmode>().is_light() {
"checked"
} else {
""
}
}
on:click=move |_| { expect_context::<Darkmode>().toggle() }
/>
<span class="label-text">Dark</span>