Skip to content
This repository was archived by the owner on Jul 31, 2026. It is now read-only.

feat(badge): add size prop (sm/md/lg) - #339

Merged
alx-xo merged 7 commits into
mainfrom
alexm/feat-badge-tiny-option
Jun 3, 2026
Merged

feat(badge): add size prop (sm/md/lg)#339
alx-xo merged 7 commits into
mainfrom
alexm/feat-badge-tiny-option

Conversation

@alx-xo

@alx-xo alx-xo commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds size prop to Badge with three values: sm, md (default, backward-compatible), lg
  • Introduces --text-2xs (9px) as a global Tailwind text scale token in global.css
  • All size classes use named Tailwind utilities — no arbitrary [px] values
  • Adds new text-trim-cap custom class to allow text to better centered 🎉
image

Test Plan

  • 64/64 tests pass (pnpm test)
  • Visual check: AllSizes and AllSizesWithIcon stories in Storybook
  • Verify md default renders identically to previous Badge (backward compat)

🤖 Generated with Claude Code

@alx-xo
alx-xo requested a review from adaam2 June 2, 2026 02:05
@alx-xo
alx-xo force-pushed the alexm/feat-badge-tiny-option branch from 36d0dae to c64314d Compare June 3, 2026 17:53
@alx-xo
alx-xo force-pushed the alexm/feat-badge-tiny-option branch from c64314d to f0e6ed8 Compare June 3, 2026 18:08
@alx-xo
alx-xo merged commit 1e1a146 into main Jun 3, 2026
5 checks passed
@alx-xo
alx-xo deleted the alexm/feat-badge-tiny-option branch June 3, 2026 18:15
Thegreatsura pushed a commit to Thegreatsura/gram that referenced this pull request Jun 5, 2026
…api#3181)

## Summary

Primary update here is updated Badge component that supports a size
prop. Default is "md" which is the existing style expectations for
`Badge` speakeasy-api/moonshine#339

- Updates @speakeasy-api/moonshine in the dashboard from 1.37.0 to
1.40.0.
- Refreshes the pnpm lockfile entry for the new Moonshine package
version.

Use of the "sm" size prop will be applied in speakeasy-api#3180, which was the
motivation for this change.

## Test Plan
- [x] pnpm -F dashboard type-check
- [x] pnpm -F dashboard build (initial run hit Node heap OOM at default
heap size)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant