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

[Bug]: "icon only danger button" is throwing an error to the console #11484

Closed
2 tasks done
caltrevizam opened this issue May 25, 2022 · 2 comments
Closed
2 tasks done

Comments

@caltrevizam
Copy link

Package

@carbon/react

Browser

Edge

Package version

1.1.0

React version

17.0.2

Description

Hi,

Rendering a button with hasIconOnly and kind="danger" attributes set throws an error to the console

Warning: Failed prop type: Invalid prop `kind` of value `danger` supplied to `ForwardRef(IconButton)`, expected one of ["primary","secondary","ghost","tertiary"].
        at IconButton (@carbon\react\lib\components\IconButton\index.js:26:21)
        at Button (@carbon\react\lib\components\Button\Button.js:32:17)
...

Reproduction/example

https://stackblitz.com/edit/carbon-button-issue?file=src%2FApp.jsx

Steps to reproduce

Just render a button adding hasIconOnly and kind="danger" attributes

Code of Conduct

@aledavila
Copy link
Contributor

Closing as we do not support danger for icon only button.

@kkckkc
Copy link

kkckkc commented Jun 16, 2022

If danger is no longer supported for icon only buttons, then I suggest you update https://react.carbondesignsystem.com/?path=/docs/components-button--icon-button

It says

Icon-only Buttons
Icon buttons allow users to take actions, and make choices, with a single tap. Icon buttons can take the form of any of the seven types (Primary, Secondary, Tertiary, Danger, Danger tertiary, Danger ghost and Ghost) but most commonly will be styled as primary or ghost buttons.

kennylam pushed a commit to kennylam/carbon that referenced this issue Jul 30, 2024
### Related Ticket(s)

Follows: carbon-design-system#15596 & carbon-design-system#15591
### Description

Updates Tile with carbon gradient
### Changelog

**Changed**

- new carbon upgrade (using RC atm -> will need to update to full release)
- updated tile slug styles like core
- the new core styles fix an error with number-input slug revert styles


<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants