Add final touches

This commit is contained in:
Schmelczer András 2020-01-10 20:10:59 +01:00
parent b1fd2f372f
commit 0429ea7f72
64 changed files with 576 additions and 444 deletions

View file

@ -0,0 +1,9 @@
export const isSystemLevelDarkModeEnabled = (): boolean =>
window.matchMedia &&
window.matchMedia('(prefers-color-scheme: dark)').matches;
export const turnOnDarkMode = () =>
document.body.parentElement.setAttribute('theme', 'dark');
export const turnOnLightMode = () =>
document.body.parentElement.setAttribute('theme', 'light');