Skip to content

Commit

Permalink
fix: correct target theme depending on the state
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Mar 30, 2024
1 parent fcf81ed commit 5ec21af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/shell/theme_toggler.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)
}
$: modeIcon = $mustBeInDarkMode ? "dark_mode" : "light_mode"
$: otherTheme = $mustBeInDarkMode ? LIGHT_MODE : DARK_MODE
$: currentTheme = $mustBeInDarkMode ? DARK_MODE : LIGHT_MODE
onMount(() => {
themeChange(false)
Expand All @@ -35,7 +35,7 @@
tabindex="0"
role="switch"
aria-checked={$mustBeInDarkMode}
data-set-theme={otherTheme}
data-set-theme={currentTheme}
data-act-class={LIGHT_MODE}
aria-label="Toggle theme"
on:keyup|stopPropagation|preventDefault={toggleThemeThroughKeyboard}
Expand Down

0 comments on commit 5ec21af

Please sign in to comment.