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

Banner allows critical variant to use ondismiss #5583

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

brphelps
Copy link

Closes #5582

Changelog

New

Changed

Banner now supports onDismiss used when using variant critical.

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

I added a unit test and updated the example to use onDismiss.

Merge checklist

@brphelps brphelps requested a review from a team as a code owner January 21, 2025 21:37
@brphelps brphelps requested a review from TylerJDev January 21, 2025 21:37
Copy link

changeset-bot bot commented Jan 21, 2025

🦋 Changeset detected

Latest commit: 4e34a4b

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

Copy link
Member

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

Thanks so much for putting this together! Just left a couple of comments 👍

.changeset/blue-actors-rule.md Outdated Show resolved Hide resolved
@@ -25,6 +25,7 @@ export const Critical = () => {
to enable two-factor authentication as an additional security measure.
</>
}
onDismiss={action('onDismiss')}
Copy link
Member

Choose a reason for hiding this comment

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

From a docs perspective we might not want this to be visible in the default story for critical, I think the idea was that it would be rare for critical banners to be dismissible since you must address them but I'm curious what @lukasoppermann would say 👀

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, @joshblack and I discussed it and we would like to leave the the critical story as is, without the dismiss. Users can still get to it in the playground.

If you could to this change @brphelps, we can merge this.

Thank you for this PR. 🙏

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 critical Banner variant to use onDismiss
3 participants