import { Monitor, Moon, Sun } from 'lucide-react' import { cn } from '@/lib/utils' import { useTheme, type Theme } from '@/lib/theme' const OPTIONS: { value: Theme; label: string; icon: typeof Sun }[] = [ { value: 'light', label: 'Aydınlık', icon: Sun }, { value: 'dark', label: 'Karanlık', icon: Moon }, { value: 'system', label: 'Sistem', icon: Monitor }, ] /** * Aydınlık / Karanlık / Sistem seçici (radyo grubu gibi davranır, klavyeyle gezilebilir). * `compact`: yalnızca ikonlar (dar alanlar için; etiketler ekran okuyucuda kalır). */ export function ThemeToggle({ className, compact = false, }: { className?: string compact?: boolean }) { const { theme, setTheme } = useTheme() return (
{OPTIONS.map(({ value, label, icon: Icon }) => ( ))}
) }