Skip to content

Commit 0be602e

Browse files
authored
fix(scraps): do not spread all styles from theme.font onto button (#104976)
we've recently widened `theme.form` to contain more information for better grouping, but spreading has a negative impact of adding things we don't want. In this case, buttons got a padding they shouldn't have. The fix is to just apply the props we want explicitly, even if that is a bit more code.
1 parent f7f2459 commit 0be602e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

static/app/components/core/button/styles.chonk.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ export function DO_NOT_USE_getChonkButtonStyles(
8383

8484
background: 'none',
8585

86-
...buttonSizes[p.size],
86+
height: buttonSizes[p.size].height,
87+
minHeight: buttonSizes[p.size].minHeight,
88+
fontSize: buttonSizes[p.size].fontSize,
89+
lineHeight: buttonSizes[p.size].lineHeight,
8790

8891
'&::before': {
8992
content: '""',

0 commit comments

Comments
 (0)