Skip to content

Commit

Permalink
fix(Button): default padding for small size (#2626)
Browse files Browse the repository at this point in the history
* fix(Button): low density padding

* chore: add changeset
  • Loading branch information
cf-remylenoir committed Dec 6, 2023
1 parent 0b3242c commit bb5e913
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/red-pots-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@contentful/f36-button": patch
---

fix(Button): default padding for small size
4 changes: 3 additions & 1 deletion packages/components/button/src/Button/Button.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ const sizeToStyles = (size: ButtonSize, density: Density): CSSObject => {
return {
fontSize: isHighDensity ? tokens.fontSizeS : tokens.fontSizeM,
lineHeight: tokens.lineHeightCondensed,
padding: `${tokens.spacing2Xs} ${tokens.spacingXs}`,
padding: isHighDensity
? `${tokens.spacing2Xs} ${tokens.spacingXs}`
: `${tokens.spacing2Xs} ${tokens.spacingS}`,
minHeight: isHighDensity ? '16px' : '32px',
};
case 'medium':
Expand Down

1 comment on commit bb5e913

@vercel
Copy link

@vercel vercel bot commented on bb5e913 Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.