Skip to content

Commit 1bd49b0

Browse files
committed
fix: Fix the spacing and ordering of UI elements in image editor
1 parent ad087a0 commit 1bd49b0

1 file changed

Lines changed: 16 additions & 17 deletions

File tree

src/editors/sharedComponents/ImageUploadModal/ImageSettingsModal/AltTextControls.tsx

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,24 @@ const AltTextControls = () => {
1212
const formik = useFormikContext<ImageConfig>();
1313
return (
1414
<>
15-
<Form.Group className="mt-1.5">
16-
<Form.Label>
17-
{intl.formatMessage(messages.accessibilityLabel)}
18-
</Form.Label>
15+
<Form.Label className="mb-0">
16+
{intl.formatMessage(messages.accessibilityLabel)}
17+
</Form.Label>
18+
<Form.Group className="mb-1">
19+
<Form.Checkbox
20+
name="isDecorative"
21+
checked={formik.values.isDecorative}
22+
className="mt-2.5 decorative-control-label"
23+
onChange={formik.handleChange}
24+
>
25+
<Form.Label>
26+
{intl.formatMessage(messages.decorativeAltTextCheckboxLabel)}
27+
</Form.Label>
28+
</Form.Checkbox>
29+
</Form.Group>
30+
<Form.Group>
1931
<Form.Control
2032
name="altText"
21-
className="mt-1.5"
2233
floatingLabel={intl.formatMessage(messages.altTextFloatingLabel)}
2334
disabled={formik.values.isDecorative}
2435
isInvalid={Boolean(formik.errors.altText)}
@@ -32,18 +43,6 @@ const AltTextControls = () => {
3243
</Form.Control.Feedback>
3344
)}
3445
</Form.Group>
35-
<Form.Group>
36-
<Form.Checkbox
37-
name="isDecorative"
38-
checked={formik.values.isDecorative}
39-
className="mt-2.5 decorative-control-label"
40-
onChange={formik.handleChange}
41-
>
42-
<Form.Label>
43-
{intl.formatMessage(messages.decorativeAltTextCheckboxLabel)}
44-
</Form.Label>
45-
</Form.Checkbox>
46-
</Form.Group>
4746
</>
4847
);
4948
};

0 commit comments

Comments
 (0)