2024-01-31 23:04:16 -05:00

10 lines
243 B
TypeScript
Executable File

// FIXME: Should correct handle dark selector
export const getDarkmodeStatus = (): boolean => {
const html = document.documentElement;
return (
html.classList.contains("dark") ||
html.getAttribute("data-theme") === "dark"
);
};