mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-22 11:51:09 +00:00
Fix dark mode toggle
This commit is contained in:
parent
2fd3999341
commit
1931c53ac5
1 changed files with 7 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue