()
| 7 | import { Button } from "@/components/ui/button" |
| 8 | |
| 9 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected