This commit is contained in:
Oliver Bryan
2026-01-07 15:02:52 +00:00
parent 5d2ee6cc13
commit dfbc26af3a
9 changed files with 268 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
import { Moon, Sun } from "lucide-react";
import { useEffect, useState } from "react";
import { Button } from "@/components/ui/button";
function ThemeToggle() {
const [theme, setTheme] = useState<string | null>();
@@ -19,8 +20,9 @@ function ThemeToggle() {
}
return (
<button
<Button
type="button"
variant="dummy"
className="rounded cursor-pointer"
onClick={() => {
if (!theme || theme === "light") updateTheme("dark");
@@ -28,7 +30,7 @@ function ThemeToggle() {
}}
>
{theme === "dark" ? <Sun /> : <Moon />}
</button>
</Button>
);
}