improved themeswitcher button indicating

main
Midnight 3 years ago
parent f9acc0019a
commit 81d8c5c92b

@ -16,9 +16,17 @@ export default function ThemeToggle() {
window.localStorage.setItem("theme", activeTheme); window.localStorage.setItem("theme", activeTheme);
}, [activeTheme]); }, [activeTheme]);
return ( if(activeTheme == 'light') {
<a onClick={() => setActiveTheme(inactiveTheme)} href="#"> return (
<span>🌙</span> <a onClick={() => setActiveTheme(inactiveTheme)} href="#">
</a> <span>🌙</span>
) </a>
)
} else {
return (
<a onClick={() => setActiveTheme(inactiveTheme)} href="#">
<span></span>
</a>
)
}
} }
Loading…
Cancel
Save