import { Popover } from '@base-ui/react/popover'; import { CheckIcon, PaletteIcon } from 'lucide-react'; import { useSyncExternalStore } from 'react'; import { applyTheme, onTheme, themeId, themes } from '#/lib/theme.js'; import { cn } from '#/lib/utils.js'; /** * Which palette the page paints in. The account may publish its own beside * the ones the page ships, and a reader's pick is theirs: it is remembered * in this browser and never written back. */ export function ThemeMenu() { const chosen = useSyncExternalStore(onTheme, themeId, () => ''); const all = themes(); return ( {all.map((one) => ( ))} ); }