IconButton with danger kind #11832
stanley-regnard
started this conversation in
Release Feedback
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Update
Linked to:
Issue: #11892;
PR: #11893; discussion continued here, working as intended: #11893 (comment)
Context
We are currently migrating from v10 to v11, using
@carbon/react 1.7.0
Problem
The following code:
Outputs the following warning in the console:
Displays and functions as intended otherwise.
Possible solution
Found this in IconButton/index.js:
kind: PropTypes.oneOf(['primary', 'secondary', 'ghost', 'tertiary']),
In Button.js:
kind: PropTypes.oneOf(ButtonKinds),
In prop-types/types.js:
var ButtonKinds = ['primary', 'secondary', 'danger', 'ghost', 'danger--primary', 'danger--ghost', 'danger--tertiary', 'tertiary'];
I suppose it should be
kind: PropTypes.oneOf(ButtonKinds),
in IconButton too?Beta Was this translation helpful? Give feedback.
All reactions