| import { Moon, Sun } from "lucide-react"; | |
| import { useTheme } from "@/lib/theme"; | |
| import { Button } from "@/components/ui/button"; | |
| export function ThemeToggle() { | |
| const { theme, toggle } = useTheme(); | |
| return ( | |
| <Button variant="ghost" size="icon" onClick={toggle} title="Toggle theme" aria-label="Toggle theme"> | |
| {theme === "dark" ? <Sun className="h-4 w-4" /> : <Moon className="h-4 w-4" />} | |
| </Button> | |
| ); | |
| } | |