fix(ui): wrap action-button groups so they don't clip on mobile

Since kit buttons now keep their natural width (flexShrink:0 + nowrap), a row of them can't shrink — so button groups that were flexShrink:0 with no wrap got clipped on phones (the page has overflow-x:hidden). The draft-concept Alert actions (Offers + Invoices) and the shared PageHeader actions now use flexWrap:wrap and drop flexShrink:0, so the group conforms to the available width and its buttons wrap onto stacked lines. Verified at 430px: the Offers draft alert no longer overflows (buttons stack), page has no horizontal scroll.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-07 16:05:32 +02:00
parent 8cee828212
commit 1e155f6ffb
3 changed files with 21 additions and 3 deletions

View File

@@ -794,7 +794,13 @@ export default function Invoices() {
: "—"}
</Typography>
</Box>
<Box sx={{ display: "flex", gap: 1, flexShrink: 0 }}>
<Box
sx={{
display: "flex",
gap: 1,
flexWrap: "wrap",
}}
>
<Button
component={RouterLink}
to="/invoices/new"

View File

@@ -801,7 +801,13 @@ export default function Offers() {
{draft.form.currency ? ` · ${draft.form.currency}` : ""}
</Typography>
</Box>
<Box sx={{ display: "flex", gap: 1, flexShrink: 0 }}>
<Box
sx={{
display: "flex",
gap: 1,
flexWrap: "wrap",
}}
>
<Button
component={RouterLink}
to="/offers/new"

View File

@@ -38,7 +38,13 @@ export default function PageHeader({
</Box>
{actions && (
<Box
sx={{ display: "flex", alignItems: "center", gap: 1, flexShrink: 0 }}
sx={{
display: "flex",
alignItems: "center",
justifyContent: "flex-end",
gap: 1,
flexWrap: "wrap",
}}
>
{actions}
</Box>