Skip to content

feat: add size option for Tag Buttons#2305

Open
Bracciata wants to merge 4 commits intodevelopfrom
feat/button-tag-size-prop
Open

feat: add size option for Tag Buttons#2305
Bracciata wants to merge 4 commits intodevelopfrom
feat/button-tag-size-prop

Conversation

@Bracciata
Copy link
Copy Markdown
Contributor

Closes #1957

@Bracciata Bracciata requested a review from a team as a code owner April 6, 2026 19:50
Copilot AI review requested due to automatic review settings April 6, 2026 19:50
@Bracciata Bracciata requested a review from a team as a code owner April 6, 2026 19:50
@aws-amplify-us-east-1
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2305.d15792l1n26ww3.amplifyapp.com

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for rendering Button with variant="tag" at the smaller Tag size, aligning Button’s tag variant behavior with the existing Tag component sizing API (Issue #1957).

Changes:

  • Added a size prop to Button and TagButton and applied Tag--small styling when variant="tag" and size="small".
  • Added unit tests covering size="small" for both Button (tag variant) and TagButton.
  • Added Playwright component screenshot coverage and committed new baseline images for small tag buttons (light/dark).

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/react/src/components/TagButton/index.tsx Plumbs size through TagButton into Button.
packages/react/src/components/TagButton/index.test.tsx Adds a unit test asserting Tag--small is applied.
packages/react/src/components/Button/index.tsx Introduces size prop and toggles Tag--small class for tag variant.
packages/react/src/components/Button/index.test.tsx Adds unit test for small tag button class behavior.
packages/react/src/components/Button/screenshots.e2e.tsx Adds screenshot test for variant="tag" + size="small" states (light/dark).
e2e/screenshots/button-variant-tag-size-small-.png New baseline screenshot (light theme).
e2e/screenshots/dark--button-variant-tag-size-small-.png New baseline screenshot (dark theme).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow Button variant="tag" to support the Tag size prop

3 participants