MCPcopy Create free account
hub / github.com/ShaanCoding/makeread.me / ThemeToggle

Function ThemeToggle

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

Source from the content-addressed store, hash-verified

7import { Button } from "@/components/ui/button"
8
9export function ThemeToggle() {
10 const { setTheme, theme } = useTheme()
11
12 return (
13 <Button
14 variant="ghost"
15 size="icon"
16 onClick={() => setTheme(theme === "light" ? "dark" : "light")}
17 >
18 <Sun className="h-6 w-[1.3rem] dark:hidden" />
19 <Moon className="hidden size-5 dark:block" />
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