import { html, nothing, type TemplateResult } from 'lit'; import type { PlaygroundDefinition, PlaygroundProps } from '../types.js'; import { renderPropsPanel } from './props-panel.js'; export function renderWorkspace( definition: PlaygroundDefinition, props: PlaygroundProps, onPropChange: (key: string, value: string | boolean) => void, onReset: () => void, ): TemplateResult { const previewClass = definition.getPreviewClass?.(props) ?? ''; const preview = definition.renderPreview(props, { onPropChange }); return html`
${definition.description}
` : nothing }