Fix theme not switching
This commit is contained in:
parent
2f1221a568
commit
fbb0701b51
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hibas123/theme-preact",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"description": "",
|
||||
"main": "out/index.js",
|
||||
"dependencies": {
|
||||
|
@ -47,6 +47,8 @@ export default function Theme({ mode, children, ...colors }: IThemeProps) {
|
||||
setIsDark(modeMediaQuery.matches);
|
||||
|
||||
return modeMediaQuery.removeListener(listener);
|
||||
} else {
|
||||
setIsDark(mode === ThemeModes.DARK);
|
||||
}
|
||||
}, [mode]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user