From 763fce6da994f9a53126e83da2a2e868820de2ed Mon Sep 17 00:00:00 2001 From: Petyo Ivanov Date: Sun, 23 Jun 2024 21:09:13 +0300 Subject: [PATCH] fix: restore BoldItalicUnderlineToggles --- .../components/BoldItalicUnderlineToggles.tsx | 58 +++++++++---------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/src/plugins/toolbar/components/BoldItalicUnderlineToggles.tsx b/src/plugins/toolbar/components/BoldItalicUnderlineToggles.tsx index 5e960bf4..24874379 100644 --- a/src/plugins/toolbar/components/BoldItalicUnderlineToggles.tsx +++ b/src/plugins/toolbar/components/BoldItalicUnderlineToggles.tsx @@ -44,38 +44,36 @@ export interface BoldItalicUnderlineTogglesProps { export const BoldItalicUnderlineToggles: React.FC = ({ options }: BoldItalicUnderlineTogglesProps) => { const t = useTranslation() + const showAllButtons = typeof options === 'undefined' return (
- {!options || - (options.includes('Bold') && ( - - ))} - {!options || - (options.includes('Italic') && ( - - ))} - {!options || - (options.includes('Underline') && ( - - ))} + {showAllButtons || options.includes('Bold') ? ( + + ) : null} + {showAllButtons || options.includes('Italic') ? ( + + ) : null} + {showAllButtons || options.includes('Underline') ? ( + + ) : null}
) }