Refactor and fix
This commit is contained in:
parent
91d92f7f48
commit
4be519f052
22 changed files with 118 additions and 113 deletions
|
|
@ -2,7 +2,7 @@ export const isSystemLevelDarkModeEnabled = (): boolean =>
|
|||
matchMedia && matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
|
||||
export const turnOnDarkMode = () =>
|
||||
document.body.parentElement.setAttribute('theme', 'dark');
|
||||
document.documentElement.setAttribute('theme', 'dark');
|
||||
|
||||
export const turnOnLightMode = () =>
|
||||
document.body.parentElement.setAttribute('theme', 'light');
|
||||
document.documentElement.setAttribute('theme', 'light');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue