@crossed/styled
Version:
A universal & performant styling library for React Native, Next.js & React
13 lines (12 loc) • 342 B
JavaScript
const setTheme = (old, theme) => {
if (typeof window !== "undefined") {
if (!window.document.documentElement.classList.contains(theme)) {
window.document.documentElement.classList.remove(old);
window.document.documentElement.classList.add(theme);
}
}
};
export {
setTheme
};
//# sourceMappingURL=setTheme.web.js.map