-
Notifications
You must be signed in to change notification settings - Fork 565
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 4e34a4b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
3f57069
to
18a7d8b
Compare
There was a problem hiding this 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 👍
@@ -25,6 +25,7 @@ export const Critical = () => { | |||
to enable two-factor authentication as an additional security measure. | |||
</> | |||
} | |||
onDismiss={action('onDismiss')} |
There was a problem hiding this comment.
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 👀
There was a problem hiding this comment.
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. 🙏
Co-authored-by: Josh Black <[email protected]>
Closes #5582
Changelog
New
Changed
Banner now supports onDismiss used when using variant
critical
.Removed
Rollout strategy
Testing & Reviewing
I added a unit test and updated the example to use onDismiss.
Merge checklist