import { THEMES, theme } from '../theme.ts' import type { ThemeMode } from '../theme.ts' interface Props { current: ThemeMode onSelect: (mode: ThemeMode) => void onClose: () => void } const modes = Object.keys(THEMES) as ThemeMode[] export default function ThemeSelector({ current, onSelect, onClose }: Props) { return (
e.stopPropagation()} > Choose Theme
{modes.map((mode) => { const t = THEMES[mode] const isActive = mode === current return ( ) })}
) }