Skip to content

Commit 147740b

Browse files
committed
fix(ui-buttons): fix for the ai button height glitch
1 parent 327fe69 commit 147740b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 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%)`,
@@ -461,8 +466,7 @@ const generateStyle = (
461466
? {
462467
background: `
463468
linear-gradient(to bottom, ${componentTheme.aiBorderTopGradientColor} 0%, ${componentTheme.aiBorderBottomGradientColor} 100%)`,
464-
backgroundClip: 'text',
465-
color: 'transparent'
469+
backgroundClip: 'text'
466470
}
467471
: {})
468472
},

0 commit comments

Comments
 (0)