Skip to content

Commit b46ddb7

Browse files
balzssclaude
andcommitted
fix(ui-buttons): fix textAlign center on Buttons without icon
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 <noreply@anthropic.com>
1 parent 88f3c40 commit b46ddb7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • packages/ui-buttons/src/BaseButton/v2

packages/ui-buttons/src/BaseButton/v2/styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ const generateStyle = (
496496
width: '100%',
497497
display: 'flex',
498498
alignItems: 'center',
499+
justifyContent: textAlign === 'center' ? 'center' : 'flex-start',
499500
direction: 'inherit',
500501
userSelect: 'none',
501502
transition: 'background 0.2s, transform 0.2s',

0 commit comments

Comments
 (0)