From a94cccc4ab941254a04171b6d3884665d4765e80 Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Fri, 5 Apr 2024 10:12:08 +1100 Subject: [PATCH] improve themecover styling for removal and editing --- src/interface/components/ThemeCover.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/interface/components/ThemeCover.tsx b/src/interface/components/ThemeCover.tsx index cd274939..ac9453a0 100644 --- a/src/interface/components/ThemeCover.tsx +++ b/src/interface/components/ThemeCover.tsx @@ -19,6 +19,7 @@ export const ThemeCover: React.FC = ({ onThemeDelete, }) => { const handleThemeClick = () => { + if (isEditMode) return; onThemeSelect(theme.id); }; @@ -36,19 +37,21 @@ export const ThemeCover: React.FC = ({ > {isEditMode && (
)} - {/* edit button */} -
browser.runtime.sendMessage({ type: 'currentTab', info: 'OpenThemeCreator', body: { themeID: theme.id } })} - > - -
+ + { isEditMode ? <> : +
browser.runtime.sendMessage({ type: 'currentTab', info: 'OpenThemeCreator', body: { themeID: theme.id } })} + > + +
+ }
{/* Render theme cover image or placeholder */}