MCPcopy Create free account
hub / github.com/codename-co/stack / applyTheme

Function applyTheme

packages/website/src/components/DarkModeSwitcher.tsx:34–40  ·  view source on GitHub ↗
(theme: string)

Source from the content-addressed store, hash-verified

32 }, []);
33
34 const applyTheme = (theme: string) => {
35 if (theme === "dark") {
36 document.documentElement.classList.add("dark");
37 } else if (theme === "light") {
38 document.documentElement.classList.remove("dark");
39 }
40 };
41
42 const handleThemeChange = (newTheme: string) => {
43 setActiveTheme(newTheme);

Callers 2

DarkModeSwitcherFunction · 0.85
handleThemeChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected