From c62a499635d32e15b253791a07b1b7baa2e78ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20S=C3=A1ros?= Date: Tue, 5 May 2026 16:55:21 +0200 Subject: [PATCH] fix(ui-buttons): fix textAlign center on Buttons without icon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The content wrapper changed from display:block to display:flex in the v2 button rewrite, which made textAlign:center ineffective on the shrunk children span. Add justifyContent based on textAlign so text is centered regardless of whether an icon is present. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- packages/ui-buttons/src/BaseButton/v2/styles.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ui-buttons/src/BaseButton/v2/styles.ts b/packages/ui-buttons/src/BaseButton/v2/styles.ts index 009cda1f1a..f83075e6e6 100644 --- a/packages/ui-buttons/src/BaseButton/v2/styles.ts +++ b/packages/ui-buttons/src/BaseButton/v2/styles.ts @@ -496,6 +496,7 @@ const generateStyle = ( width: '100%', display: 'flex', alignItems: 'center', + justifyContent: textAlign === 'center' ? 'center' : 'flex-start', direction: 'inherit', userSelect: 'none', transition: 'background 0.2s, transform 0.2s',