import type { JSX } from "solid-js"; import { type ThemePreference, preference, setPreference, } from "../theme"; // 3-way system → light → dark → system toggle. robomp has no icon library, so // each preference renders an inline 16px SVG (monitor / sun / moon) styled with // the existing `.btn.ghost.tiny` chrome. const NEXT_PREFERENCE: Record = { system: "light", light: "dark", dark: "system", }; const PREFERENCE_LABEL: Record = { system: "System theme", light: "Light theme", dark: "Dark theme", }; function MonitorIcon(): JSX.Element { return ( ); } function SunIcon(): JSX.Element { return ( ); } function MoonIcon(): JSX.Element { return ( ); } export function ThemeToggle(): JSX.Element { const icon = (): JSX.Element => { const p = preference(); if (p === "light") return ; if (p === "dark") return ; return ; }; const label = (): string => `${PREFERENCE_LABEL[preference()]} — click to switch`; return ( ); }