Skip to content

Commit

Permalink
chore(badge): add min-width to small badge (#4072)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrantz authored Sep 17, 2024
1 parent f8a5583 commit ae52236
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/eleven-wombats-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@twilio-paste/badge": patch
"@twilio-paste/core": patch
---

[Badge] add a min-width of size-base-50 to small badges to ensure badges with only one character (e.g. "1") render as a circle rather than an oval.
2 changes: 2 additions & 0 deletions packages/paste-core/components/badge/src/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export const Badge = React.forwardRef<HTMLElement, BadgeProps>(
element={element}
paddingX={size === "small" ? "space20" : "space30"}
paddingY={size === "small" ? "space10" : "space20"}
minWidth={size === "small" ? "sizeBase50" : "size0"}
justifyContent="center"
variant={variant}
ref={ref}
{...badgeStyles}
Expand Down

0 comments on commit ae52236

Please sign in to comment.