import { BaseControl } from '@wordpress/components'; import { sprintf, __ } from '@wordpress/i18n'; import { Lang, Theme } from 'shiki'; import defaultThemes from '../../defaultThemes.json'; import { ThemePreview } from '../components/ThemePreview'; type ThemeSelectProps = { theme: Theme; language: Lang; code: string; fontSize: string; lineHeight: string; fontFamily: string; onClick: (slug: Theme) => void; }; export const ThemeSelect = ({ theme, language, code, fontSize, lineHeight, fontFamily, onClick, }: ThemeSelectProps) => { return (
{Object.entries(defaultThemes).map(([slug, name]) => ( { onClick(slug as Theme); }} code={code} /> ))}
); };