File size: 268 Bytes
faca43f
 
 
 
 
 
 
 
 
 
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";
	}
}