refactor(ui): improve button layouts and modal sizing of formFill (#7509)

Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
This commit is contained in:
brios
2026-08-29 22:22:34 +01:00
committed by GitHub
co-authored by Anthony Stirling
parent ddc0ac0ced
commit c5da4177c4
@@ -117,8 +117,10 @@ export function FormSaveBar({
withBorder withBorder
style={{ style={{
pointerEvents: "auto", pointerEvents: "auto",
minWidth: "320px", // Fill the viewport on small screens instead of overflowing the
maxWidth: "420px", // left edge with a fixed 320px+ minimum width.
width: "min(420px, calc(100vw - 2rem))",
maxWidth: "100%",
overflow: "hidden", overflow: "hidden",
}} }}
> >
@@ -168,7 +170,7 @@ export function FormSaveBar({
</Group> </Group>
{isDirty && ( {isDirty && (
<Group gap="xs" mt="xs"> <Group gap="xs" mt="xs" wrap="wrap">
<Button <Button
size="sm" size="sm"
variant="secondary" variant="secondary"
@@ -176,7 +178,7 @@ export function FormSaveBar({
loading={applying} loading={applying}
disabled={saving} disabled={saving}
onClick={handleApply} onClick={handleApply}
style={{ flex: 1 }} style={{ flex: "1 1 10rem", minWidth: 0 }}
> >
{t("viewer.formBar.apply", "Apply Changes")} {t("viewer.formBar.apply", "Apply Changes")}
</Button> </Button>
@@ -186,7 +188,7 @@ export function FormSaveBar({
loading={saving} loading={saving}
disabled={applying || policyEnforcing} disabled={applying || policyEnforcing}
onClick={handleDownload} onClick={handleDownload}
style={{ flex: 1 }} style={{ flex: "1 1 10rem", minWidth: 0 }}
> >
{t("viewer.formBar.download", "Download PDF")} {t("viewer.formBar.download", "Download PDF")}
</Button> </Button>