Skip to content

Commit e385461

Browse files
committed
fix(ui-buttons): fix for AI secondary button visual glitch
1 parent 327fe69 commit e385461

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,11 @@ const generateStyle = (
380380
//TODO not the greatest solution. Must be stronger than the same &&& enforcement of <View>
381381
...(color === 'ai-secondary'
382382
? {
383+
// Prevents the button from being stretched vertically by a flex parent.
384+
// Without this, flex containers with `align-items: stretch` (the default)
385+
// would force the button to fill the parent's height.
386+
alignSelf: 'center',
387+
383388
'&&&&&&&&&&': {
384389
background: `
385390
linear-gradient(to bottom, ${componentTheme.aiBorderTopGradientColor} 0%, ${componentTheme.aiBorderBottomGradientColor} 100%)`,

0 commit comments

Comments
 (0)