diff --git a/src/admin/ui/Button.tsx b/src/admin/ui/Button.tsx index e661473..259b1ed 100644 --- a/src/admin/ui/Button.tsx +++ b/src/admin/ui/Button.tsx @@ -14,11 +14,12 @@ export default function Button({ variant="contained" color="primary" {...props} - // Keep labels on one line — flex layouts otherwise shrink a button and - // wrap its text onto two lines, making the button tall. Callers can still - // override via their own sx. + // Keep labels on one line and at their natural width — in flex rows MUI's + // default flexShrink:1 squeezes a button below its content, so the label + // either wrapped to two lines or (with nowrap) overflowed its padding and + // hit the edges. nowrap + flexShrink:0 keeps buttons crisp. Caller sx wins. sx={[ - { whiteSpace: "nowrap" }, + { whiteSpace: "nowrap", flexShrink: 0 }, ...(Array.isArray(sx) ? sx : sx ? [sx] : []), ]} />