mirror of
https://github.com/Dvorinka/Dash.git
synced 2026-06-04 15:32:56 +00:00
9e7acc868d
Remove the "casaos" theme in favor of a unified design system. This involves cleaning up conditional styling across components, simplifying the theme toggle, and updating the global CSS variables to a more consistent dark/light mode implementation. - Remove `casaos` theme from `themes.ts` and `ThemeToggle` - Refactor `globals.css` to use a single dark mode definition - Simplify component styling by removing `isCasaOS` conditional logic - Update UI components (`Card`, `Badge`, `WidgetCard`, etc.) to use standard design tokens - Update E2E smoke tests to reflect theme changes
30 lines
658 B
TypeScript
30 lines
658 B
TypeScript
"use client";
|
|
|
|
import { useTheme } from "@/components/providers";
|
|
import { Button } from "@/components/ui/button";
|
|
import { Sun, Moon } from "lucide-react";
|
|
|
|
export function ThemeToggle() {
|
|
const { theme, setTheme } = useTheme();
|
|
|
|
const toggle = () => {
|
|
setTheme(theme === "dark" ? "light" : "dark");
|
|
};
|
|
|
|
return (
|
|
<Button
|
|
variant="ghost"
|
|
size="icon"
|
|
className="rounded-lg hover:bg-accent"
|
|
aria-label="Toggle theme"
|
|
onClick={toggle}
|
|
>
|
|
{theme === "dark" ? (
|
|
<Sun className="h-4 w-4 text-amber-400" />
|
|
) : (
|
|
<Moon className="h-4 w-4 text-foreground" />
|
|
)}
|
|
</Button>
|
|
);
|
|
}
|