File size: 268 Bytes
ece0c29
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
export function switchTheme() {
	const { classList } = document.querySelector("html") as HTMLElement;
	if (classList.contains("dark")) {
		classList.remove("dark");
		localStorage.theme = "light";
	} else {
		classList.add("dark");
		localStorage.theme = "dark";
	}
}