MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / toggleTheme

Function toggleTheme

app/components/ThemeModeToggle.tsx:9–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7 const [theme, setTheme] = useTheme();
8
9 const toggleTheme = () => {
10 setTheme((prevTheme) => (prevTheme === "light" ? "dark" : "light"));
11 };
12 const SwitchIcon = theme === "light" ? MoonIcon : SunIcon;
13
14 useHotkeys("alt+t", () => toggleTheme(), [toggleTheme]);

Callers 1

ThemeModeTogglerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected