diff --git a/src/plugins/sandpack/index.tsx b/src/plugins/sandpack/index.tsx index 0a592a89..a83dc3b1 100644 --- a/src/plugins/sandpack/index.tsx +++ b/src/plugins/sandpack/index.tsx @@ -18,7 +18,7 @@ export interface SandpackPreset { /** * The label of the preset, displayed in the sandpack button dropdown. */ - label: string + label: string | JSX.Element /** * The meta string that will be used to identify the preset from the fenced code block. e.g. "live react" */ diff --git a/src/plugins/toolbar/components/BlockTypeSelect.tsx b/src/plugins/toolbar/components/BlockTypeSelect.tsx index f903e5f1..2255bc05 100644 --- a/src/plugins/toolbar/components/BlockTypeSelect.tsx +++ b/src/plugins/toolbar/components/BlockTypeSelect.tsx @@ -19,7 +19,7 @@ export const BlockTypeSelect = () => { if (!hasQuote && !hasHeadings) { return null } - const items: { label: string; value: BlockType }[] = [{ label: 'Paragraph', value: 'paragraph' }] + const items: { label: string | JSX.Element; value: BlockType }[] = [{ label: 'Paragraph', value: 'paragraph' }] if (hasQuote) { items.push({ label: 'Quote', value: 'quote' }) diff --git a/src/plugins/toolbar/primitives/select.tsx b/src/plugins/toolbar/primitives/select.tsx index 9241ceca..6c2bcfed 100644 --- a/src/plugins/toolbar/primitives/select.tsx +++ b/src/plugins/toolbar/primitives/select.tsx @@ -88,7 +88,7 @@ export interface SelectProps { onChange: (value: T) => void triggerTitle: string placeholder: string - items: ({ label: string; value: T } | 'separator')[] + items: ({ label: string | JSX.Element; value: T } | 'separator')[] } /** diff --git a/src/plugins/toolbar/primitives/toolbar.tsx b/src/plugins/toolbar/primitives/toolbar.tsx index dfb4b159..a1ef6458 100644 --- a/src/plugins/toolbar/primitives/toolbar.tsx +++ b/src/plugins/toolbar/primitives/toolbar.tsx @@ -192,7 +192,7 @@ export interface ButtonOrDropdownButtonProps { /** * The label to show in the dropdown. */ - label: string + label: string | JSX.Element }[] }