UI Aupdate
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user