mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-01 00:23:17 +00:00
* feat: Dark mode * more work * more dark/light mode, refactor thread card * fix rest of dark mode * cr * cr * cr
24 lines
596 B
TypeScript
24 lines
596 B
TypeScript
"use client";
|
|
|
|
import { useTheme } from "@/components/theme-provider";
|
|
import { Moon, Sun } from "lucide-react";
|
|
import { TooltipIconButton } from "./ui/tooltip-icon-button";
|
|
|
|
export function ThemeToggle() {
|
|
const { theme, setTheme } = useTheme();
|
|
|
|
return (
|
|
<TooltipIconButton
|
|
tooltip="Toggle theme"
|
|
variant="ghost"
|
|
onClick={() => setTheme(theme === "light" ? "dark" : "light")}
|
|
aria-label="Toggle theme"
|
|
>
|
|
{theme === "light" ? (
|
|
<Moon className="size-4" />
|
|
) : (
|
|
<Sun className="size-4" />
|
|
)}
|
|
</TooltipIconButton>
|
|
);
|
|
}
|