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