Remove "framework"
This commit is contained in:
parent
b45bdb18a0
commit
dc86d30eb2
72 changed files with 359 additions and 333 deletions
8
src/style/dark-mode/dark-mode.ts
Normal file
8
src/style/dark-mode/dark-mode.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export const isSystemLevelDarkModeEnabled = (): boolean =>
|
||||
matchMedia && matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
|
||||
export const turnOnDarkMode = () =>
|
||||
document.body.parentElement.setAttribute('theme', 'dark');
|
||||
|
||||
export const turnOnLightMode = () =>
|
||||
document.body.parentElement.setAttribute('theme', 'light');
|
||||
Loading…
Add table
Add a link
Reference in a new issue