MCPcopy Create free account
hub / github.com/DeveloperHarris/gptstatus / ThemeToggle

Function ThemeToggle

components/theme-toggle.tsx:9–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import { Icons } from "@/components/icons"
8
9export function ThemeToggle() {
10 const { setTheme, theme } = useTheme()
11
12 return (
13 <Button
14 variant="ghost"
15 size="sm"
16 onClick={() => setTheme(theme === "light" ? "dark" : "light")}
17 >
18 <Icons.sun className="rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
19 <Icons.moon className="absolute rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
20 <span className="sr-only">Toggle theme</span>
21 </Button>
22 )
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected