()
| 6 | import { Button } from "@/components/ui/button"; |
| 7 | |
| 8 | export function ThemeToggle() { |
| 9 | const { theme, setTheme } = useTheme(); |
| 10 | |
| 11 | return ( |
| 12 | <Button |
| 13 | variant="outline" |
| 14 | size="icon" |
| 15 | onClick={() => setTheme(theme === "light" ? "dark" : "light")} |
| 16 | className="cursor-pointer rounded-full h-8 w-8" |
| 17 | > |
| 18 | <Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0 text-primary" /> |
| 19 | <Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 text-primary" /> |
| 20 | <span className="sr-only">Toggle theme</span> |
| 21 | </Button> |
| 22 | ); |
| 23 | } |
nothing calls this directly
no outgoing calls
no test coverage detected