fix: ImageExportDialog on mobile

This commit is contained in:
Arnošt Pleskot 2023-09-07 18:32:24 +02:00
parent 33e031c9fa
commit 75cd5c20b6
No known key found for this signature in database
3 changed files with 21 additions and 2 deletions

View File

@ -122,9 +122,14 @@
} }
&__filename { &__filename {
width: 100%;
text-align: center;
& > input { & > input {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
max-width: 30em;
margin-bottom: 1em;
} }
} }
@ -162,6 +167,13 @@
display: flex; display: flex;
height: 100%; height: 100%;
align-items: center; align-items: center;
gap: 1em;
&--multipleInputs {
@include isMobile {
flex-direction: row-reverse;
}
}
} }
} }

View File

@ -268,6 +268,7 @@ const ImageExportModal = ({
<ExportSetting <ExportSetting
label={t("imageExportDialog.label.withBackground")} label={t("imageExportDialog.label.withBackground")}
name="exportBackgroundSwitch" name="exportBackgroundSwitch"
multipleInputs
> >
{exportWithBackground && ( {exportWithBackground && (
<Select <Select
@ -399,6 +400,7 @@ type ExportSettingProps = {
children: React.ReactNode; children: React.ReactNode;
tooltip?: string; tooltip?: string;
name?: string; name?: string;
multipleInputs?: boolean;
}; };
const ExportSetting = ({ const ExportSetting = ({
@ -406,6 +408,7 @@ const ExportSetting = ({
children, children,
tooltip, tooltip,
name, name,
multipleInputs,
}: ExportSettingProps) => { }: ExportSettingProps) => {
return ( return (
<div className="ImageExportModal__settings__setting" title={label}> <div className="ImageExportModal__settings__setting" title={label}>
@ -420,7 +423,12 @@ const ExportSetting = ({
</Tooltip> </Tooltip>
)} )}
</label> </label>
<div className="ImageExportModal__settings__setting__content"> <div
className={clsx("ImageExportModal__settings__setting__content", {
"ImageExportModal__settings__setting__content--multipleInputs":
multipleInputs,
})}
>
{children} {children}
</div> </div>
</div> </div>

View File

@ -3,7 +3,6 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 0 15px;
line-height: 1; line-height: 1;
gap: 5px; gap: 5px;
background: transparent; background: transparent;