import { Dropdown } from "react-bootstrap"; import { useTheme } from "./ThemeContext.tsx"; const options = [ { key: "light" as const, label: "Light", icon: "☀️" }, { key: "dark" as const, label: "Dark", icon: "🌙" }, { key: "system" as const, label: "System", icon: "💻" }, ]; export function ThemeToggle() { const { choice, setChoice } = useTheme(); const current = options.find((o) => o.key === choice) ?? options[2]; return ( {current.icon} {options.map((o) => ( setChoice(o.key)} > {o.icon} {o.label} ))} ); }