Browse Source

Fix theme not switching

master
Fabian Stamm 1 year ago
parent
commit
fbb0701b51
  1. 2
      package.json
  2. 2
      src/Theme.tsx

2
package.json

@ -1,6 +1,6 @@
{
"name": "@hibas123/theme-preact",
"version": "1.0.8",
"version": "1.0.9",
"description": "",
"main": "out/index.js",
"dependencies": {

2
src/Theme.tsx

@ -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…
Cancel
Save