IconButton

This commit is contained in:
Oliver Bryan
2026-01-17 03:46:09 +00:00
parent d63f7c33c1
commit 8dc6291eab
7 changed files with 92 additions and 64 deletions

View File

@@ -1,6 +1,6 @@
import { Moon, Sun } from "lucide-react";
import { useTheme } from "@/components/theme-provider";
import { Button } from "@/components/ui/button";
import { IconButton } from "@/components/ui/icon-button";
import { cn } from "@/lib/utils";
function ThemeToggle({ className }: { className?: string }) {
@@ -14,16 +14,14 @@ function ThemeToggle({ className }: { className?: string }) {
const isDark = resolvedTheme === "dark";
return (
<Button
type="button"
variant="dummy"
size="icon"
<IconButton
size="md"
className={cn("hover:text-muted-foreground", className)}
onClick={() => setTheme(isDark ? "light" : "dark")}
title={isDark ? "Switch to light mode" : "Switch to dark mode"}
>
{isDark ? <Sun className="size-5" /> : <Moon className="size-5" />}
</Button>
</IconButton>
);
}