UI Aupdate

This commit is contained in:
2025-11-26 19:41:03 +03:00
parent 16c21a4e49
commit 732603559a
5 changed files with 115 additions and 60 deletions

View File

@@ -1,12 +1,26 @@
import { Moon, Sun } from "lucide-react";
import { Button } from "./ui/button";
import { Button, type ButtonProps } from "./ui/button";
import { useTheme } from "../providers/theme-provider";
export function ThemeToggle() {
export function ThemeToggle({
className,
size = "icon",
variant = "outline"
}: {
className?: string;
size?: ButtonProps["size"];
variant?: ButtonProps["variant"];
}) {
const { theme, toggleTheme } = useTheme();
return (
<Button variant="outline" size="icon" aria-label="Tema değiştir" onClick={toggleTheme}>
<Button
variant={variant}
size={size}
aria-label="Tema değiştir"
onClick={toggleTheme}
className={className}
>
{theme === "light" ? <Moon className="h-5 w-5" /> : <Sun className="h-5 w-5" />}
</Button>
);