diff --git a/src/plugins/toolbar/components/BoldItalicUnderlineToggles.tsx b/src/plugins/toolbar/components/BoldItalicUnderlineToggles.tsx index d30e5b2a..5e960bf4 100644 --- a/src/plugins/toolbar/components/BoldItalicUnderlineToggles.tsx +++ b/src/plugins/toolbar/components/BoldItalicUnderlineToggles.tsx @@ -33,36 +33,49 @@ const FormatButton: React.FC = ({ format, addTitle, removeTit ) } +export interface BoldItalicUnderlineTogglesProps { + options?: ('Bold' | 'Italic' | 'Underline')[] +} + /** * A toolbar component that lets the user toggle bold, italic and underline formatting. * @group Toolbar Components */ -export const BoldItalicUnderlineToggles: React.FC = () => { +export const BoldItalicUnderlineToggles: React.FC = ({ options }: BoldItalicUnderlineTogglesProps) => { const t = useTranslation() return (
- - - + {!options || + (options.includes('Bold') && ( + + ))} + {!options || + (options.includes('Italic') && ( + + ))} + {!options || + (options.includes('Underline') && ( + + ))}
) }