Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trailingVisualLabel to SegmentedControlButton #3807

Closed
wants to merge 8 commits into from

Conversation

gwwar
Copy link
Contributor

@gwwar gwwar commented Oct 10, 2023

Pairs with primer/view_components#2278

Changelog

Sometimes it is useful to add a trailing label to items in the Segmented Control. One use case is displaying a discount when selecting between different billing intervals, eg "Monthly / Yearly (-8%)"

segmented control segmented control button
monthly and yearly with trailing visual label of -8% updates to SegmentedControl Button story

New

Adds an optional trailingVisualLabel to SegmentedControlButton. This expects a Label component

Changed

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan

Testing & Reviewing

I've added tests and updated storybook examples, but let me know if there's anything else that I should be aware of.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Storybook)
  • Changes are SSR compatible
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@gwwar gwwar requested review from a team and mperrotti October 10, 2023 21:33
@changeset-bot
Copy link

changeset-bot bot commented Oct 10, 2023

🦋 Changeset detected

Latest commit: c0a1568

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 104.74 KB (+0.04% 🔺)
dist/browser.umd.js 105.32 KB (+0.04% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-3807 October 10, 2023 21:42 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3807 October 10, 2023 21:44 Inactive
@gwwar gwwar temporarily deployed to github-pages October 10, 2023 22:17 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3807 October 10, 2023 22:18 Inactive
@gwwar
Copy link
Contributor Author

gwwar commented Oct 27, 2023

Closing this out for now, but I may circle back to this.

@gwwar gwwar closed this Oct 27, 2023
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.

1 participant