-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Update IconButtonKinds #18251
Update IconButtonKinds #18251
Conversation
Add missing danger and ghost kinds
All contributors have signed the DCO. |
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
I have read the DCO document and I hereby sign the DCO. |
recheck |
@albert-schilling Hey, thanks for bringing this up! More detail on the justification behind the decision should be coming to the website via a new PR put up just after you opened this PR, carbon-design-system/carbon-website#4409. @alina-jacob might be able to share a preview of that content to help clarify. So with the continued stance that this isn't recommended based on guidance from design, |
Add missing danger kinds
Closes #7211 , #11484
Refers to #14300, #14307, #17036
The
IconButtonKinds
were missing the danger options, even though the styles existed and the results are compelling.I do not understand the reasoning behind why a destructive action should not be accessible via an
IconButton
, as mentioned in #4176. Any destructive action should require confirmation, such as through a modal. UsingIconButtons
helps reduce the visual load and keeps the UI slim and focused. Forcing designers or developers to use a regular button is not an ideal solution. Designers should have the flexibility to make this decision based on the specific context and the action's consequences.If you agree with the suggested changes, I would be happy to update the Storybook story and the documentation in this PR as well.
Changelog
New
danger
,danger--tertiary
,danger--ghost
to the possibleIconButtonKinds
.Testing / Reviewing
IconButton
story, select e.g.danger
as kind and check the console. There should be no prop type validation error.