From e4f1af1e94ee62faebfdeb0962c8f423455aee00 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Thu, 13 Jul 2023 15:45:09 +0530 Subject: [PATCH] chore: fix toolbar image option color --- packages/icons/src/Icons/ic-file-image.svg | 4 ++-- packages/icons/src/Lexical/file-image.svg | 1 - .../SuperEditor/Plugins/Blocks/RemoteImage.tsx | 8 +++++++- .../MobileToolbarPlugin/MobileToolbarPlugin.tsx | 10 ++++++++-- 4 files changed, 17 insertions(+), 6 deletions(-) delete mode 100644 packages/icons/src/Lexical/file-image.svg diff --git a/packages/icons/src/Icons/ic-file-image.svg b/packages/icons/src/Icons/ic-file-image.svg index 8e5ef196a..41a92561f 100644 --- a/packages/icons/src/Icons/ic-file-image.svg +++ b/packages/icons/src/Icons/ic-file-image.svg @@ -1,4 +1,4 @@ - - + + diff --git a/packages/icons/src/Lexical/file-image.svg b/packages/icons/src/Lexical/file-image.svg deleted file mode 100644 index 0940c182a..000000000 --- a/packages/icons/src/Lexical/file-image.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/Blocks/RemoteImage.tsx b/packages/web/src/javascripts/Components/SuperEditor/Plugins/Blocks/RemoteImage.tsx index f04c18d13..cfee14214 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/Blocks/RemoteImage.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/Blocks/RemoteImage.tsx @@ -1,3 +1,9 @@ export function GetRemoteImageBlock(onSelect: () => void) { - return { name: 'Image from URL', iconName: 'file-image', keywords: ['image', 'url'], onSelect } + return { + name: 'Image from URL', + iconName: 'file-image', + iconClassName: '!text-current', + keywords: ['image', 'url'], + onSelect, + } } diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/MobileToolbarPlugin/MobileToolbarPlugin.tsx b/packages/web/src/javascripts/Components/SuperEditor/Plugins/MobileToolbarPlugin/MobileToolbarPlugin.tsx index a1bcf90a5..714ba00f3 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/MobileToolbarPlugin/MobileToolbarPlugin.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/MobileToolbarPlugin/MobileToolbarPlugin.tsx @@ -65,7 +65,13 @@ const MobileToolbarPlugin = () => { }, [editor]) const items = useMemo( - () => [ + (): { + name: string + iconName: string + iconClassName?: string + keywords?: string[] + onSelect: () => void + }[] => [ { name: 'Bold', iconName: 'bold', @@ -222,7 +228,7 @@ const MobileToolbarPlugin = () => { onClick={item.onSelect} key={item.name} > - + ) })}