From a005c789c1fcc2fb60eb5db50f9b3bf6af39f82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=C5=A1t=20Pleskot?= Date: Tue, 8 Aug 2023 17:39:50 +0200 Subject: [PATCH] feat: hide background image select when background is not checked --- src/components/ImageExportDialog.tsx | 34 +++++++++++++++------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/components/ImageExportDialog.tsx b/src/components/ImageExportDialog.tsx index 52a30a0f7..10013172b 100644 --- a/src/components/ImageExportDialog.tsx +++ b/src/components/ImageExportDialog.tsx @@ -197,22 +197,24 @@ const ImageExportModal = ({ label={t("imageExportDialog.label.withBackground")} name="exportBackgroundSwitch" > - { + if (isBackgroundImageKey(value)) { + setExportBackgroundImage(value); + actionManager.executeAction( + actionChangeExportBackgroundImage, + "ui", + EXPORT_BACKGROUND_IMAGES[value].path, + ); + } + }} + /> + )}