Admin Panel
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-09-29 14:57:37 +07:00
parent 04fbddba13
commit 8c6dad2a31
94 changed files with 4864 additions and 1151 deletions
@@ -0,0 +1,23 @@
import { Moon, Sun } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { useAppearance } from '@/hooks/use-appearance';
/** Light/dark switch for the admin panel header. */
export function AdminThemeToggle() {
const { resolvedAppearance, updateAppearance } = useAppearance();
const isDark = resolvedAppearance === 'dark';
const label = isDark ? 'Ganti ke mode terang' : 'Ganti ke mode gelap';
return (
<Button
variant="outline"
size="icon"
aria-label={label}
title={label}
onClick={() => updateAppearance(isDark ? 'light' : 'dark')}
className="size-9 cursor-pointer"
>
{isDark ? <Sun className="size-4" /> : <Moon className="size-4" />}
</Button>
);
}