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


                                    
                                                                      
 



                                    



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

function toggleTheme() {
	let theme: Theme = JSON.parse(localStorage.getItem("theme")!);

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

	setTheme(theme);
}