We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e5327d commit d1c5cf1Copy full SHA for d1c5cf1
css-theme/src/app.ts
@@ -11,9 +11,10 @@ WebFont.load({
11
const light: HTMLLinkElement = document.querySelector('#light');
12
const dark: HTMLLinkElement = document.querySelector('#dark');
13
14
-const theme = localStorage.getItem('theme');
+const theme:string = localStorage.getItem('theme');
15
const body: HTMLElement = document.body;
16
-body.classList.add(theme ? theme : 'dark');
+const defaultTheme: string = 'dark';
17
+body.classList.add(theme ? theme : defaultTheme);
18
19
dark.onclick = e => {
20
body.classList.remove('light');
0 commit comments