Initial commit

This commit is contained in:
Developer
2026-02-06 21:44:04 -06:00
commit f85e93c7a6
151 changed files with 22916 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
"use client";
import { useTheme } from "next-themes";
import { useEffect, useState } from "react";
export default function ThemeToggle() {
const { theme, setTheme } = useTheme();
const [mounted, setMounted] = useState(false);
useEffect(() => setMounted(true), []);
if (!mounted) return null;
const isDark = theme === "dark";
return (
<button
className="btn-ghost btn-sm px-3 py-2 rounded-lg border border-gray-300 dark:border-slate-600 hover:bg-gray-100 dark:hover:bg-slate-700 shadow-sm"
onClick={() => setTheme(isDark ? "light" : "dark")}
aria-label="Toggle theme"
title={isDark ? "Switch to light mode" : "Switch to dark mode"}
>
{isDark ? "🌙" : "☀️"}
</button>
);
}