summaryrefslogblamecommitdiff
path: root/js/toggleTheme.ts
blob: b5514d23b853c617e57d0f25fe61eccfb18302bf (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                    


                                    
                               
 



                                    



                        
/// <reference path="getTheme.ts" />
/// <reference path="setTheme.ts" />

function toggleTheme() {
	let theme = getTheme();

	if (theme == Theme.Light) {
		theme = Theme.Dark;
	} else if (Theme.Dark) {
		theme = Theme.Light;
	}

	setTheme(theme);
}