feat: hide background image select when background is not checked
This commit is contained in:
parent
9e9f564ea9
commit
a005c789c1
@ -197,22 +197,24 @@ const ImageExportModal = ({
|
|||||||
label={t("imageExportDialog.label.withBackground")}
|
label={t("imageExportDialog.label.withBackground")}
|
||||||
name="exportBackgroundSwitch"
|
name="exportBackgroundSwitch"
|
||||||
>
|
>
|
||||||
<Select
|
{exportWithBackground && (
|
||||||
items={EXPORT_BACKGROUND_IMAGES}
|
<Select
|
||||||
ariaLabel={t("imageExportDialog.label.backgroundImage")}
|
items={EXPORT_BACKGROUND_IMAGES}
|
||||||
placeholder={t("imageExportDialog.label.backgroundImage")}
|
ariaLabel={t("imageExportDialog.label.backgroundImage")}
|
||||||
value={exportBackgroundImage}
|
placeholder={t("imageExportDialog.label.backgroundImage")}
|
||||||
onChange={(value) => {
|
value={exportBackgroundImage}
|
||||||
if (isBackgroundImageKey(value)) {
|
onChange={(value) => {
|
||||||
setExportBackgroundImage(value);
|
if (isBackgroundImageKey(value)) {
|
||||||
actionManager.executeAction(
|
setExportBackgroundImage(value);
|
||||||
actionChangeExportBackgroundImage,
|
actionManager.executeAction(
|
||||||
"ui",
|
actionChangeExportBackgroundImage,
|
||||||
EXPORT_BACKGROUND_IMAGES[value].path,
|
"ui",
|
||||||
);
|
EXPORT_BACKGROUND_IMAGES[value].path,
|
||||||
}
|
);
|
||||||
}}
|
}
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<Switch
|
<Switch
|
||||||
name="exportBackgroundSwitch"
|
name="exportBackgroundSwitch"
|
||||||
checked={exportWithBackground}
|
checked={exportWithBackground}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user