From 9278d48a6d09bf6a275e89ae097482bc9ea83672 Mon Sep 17 00:00:00 2001 From: BOHA Date: Sun, 7 Jun 2026 13:08:36 +0200 Subject: [PATCH] fix(ui): keep Button labels on one line (whiteSpace: nowrap) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In flex rows (e.g. the add-item/add-section buttons next to a 'Ze šablony…' select on OfferDetail/OrderConfirmationModal/InvoiceDetail), flexbox shrank a button below its text width and wrapped the label onto two lines, making the button tall. The kit Button now defaults to whiteSpace: nowrap (merged with any caller sx, still overridable), so labels stay single-line app-wide. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/admin/ui/Button.tsx | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/admin/ui/Button.tsx b/src/admin/ui/Button.tsx index 2c9e39c..e661473 100644 --- a/src/admin/ui/Button.tsx +++ b/src/admin/ui/Button.tsx @@ -5,8 +5,22 @@ import type { ElementType } from "react"; * Accepts `component` + any extra props the component requires * (e.g. `component={RouterLink} to="/foo"` or `component="a" href="…"`). */ -export default function Button( - props: ButtonProps, -) { - return ; +export default function Button({ + sx, + ...props +}: ButtonProps) { + return ( + + ); }