You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug]: Console Warning: Invalid prop kind of value danger--tertiary supplied to ForwardRef(IconButton2), despite documentation support Button component and base code including "danger--tertiary" in the kind props array.
#18253
Open
1 of 2 tasks
SantoshV01 opened this issue
Dec 13, 2024
· 0 comments
A console warning appears indicating a failed prop type validation for the kind prop in the Button component.
The warning states: Warning: Failed prop type: Invalid prop kind of value danger--tertiary supplied to ForwardRef(IconButton2), expected one of ["primary","secondary","ghost","tertiary"].
However, the UI and functionality are unaffected; the Button component renders correctly with the specified kind value (danger--tertiary). Additionally, the component documentation explicitly lists danger--tertiary as a valid value for the kind prop.
Expected Behavior:
No warning should appear in the console if the kind prop value is valid per the documentation.
Actual Behavior:
A warning appears in the console, indicating a prop validation failure, despite the value being documented and the component rendering as expected.
Impact:
The warning could confuse developers and lead to unnecessary debugging efforts.
No functional or UI impact is observed.
Potential Cause:
Mismatch between the documentation and the actual prop validation logic implemented in the component.
SantoshV01
changed the title
[Bug]: Console Warning: Invalid prop kind of value danger--tertiary supplied to ForwardRef(IconButton2), despite documentation support and base code including "danger--tertiary" in the kind props array.
[Bug]: Console Warning: Invalid prop kind of value danger--tertiary supplied to ForwardRef(IconButton2), despite documentation support Button components and base code including "danger--tertiary" in the kind props array.
Dec 13, 2024
SantoshV01
changed the title
[Bug]: Console Warning: Invalid prop kind of value danger--tertiary supplied to ForwardRef(IconButton2), despite documentation support Button components and base code including "danger--tertiary" in the kind props array.
[Bug]: Console Warning: Invalid prop kind of value danger--tertiary supplied to ForwardRef(IconButton2), despite documentation support Button component and base code including "danger--tertiary" in the kind props array.
Dec 13, 2024
Package
@carbon/react
Browser
Chrome, Safari
Package version
v1.72.0
React version
v18.3.1
Description
A console warning appears indicating a failed prop type validation for the kind prop in the Button component.
The warning states: Warning: Failed prop type: Invalid prop
kind
of valuedanger--tertiary
supplied toForwardRef(IconButton2)
, expected one of ["primary","secondary","ghost","tertiary"].However, the UI and functionality are unaffected; the Button component renders correctly with the specified kind value (danger--tertiary). Additionally, the component documentation explicitly lists danger--tertiary as a valid value for the kind prop.
Expected Behavior:
No warning should appear in the console if the kind prop value is valid per the documentation.
Actual Behavior:
A warning appears in the console, indicating a prop validation failure, despite the value being documented and the component rendering as expected.
Impact:
The warning could confuse developers and lead to unnecessary debugging efforts.
No functional or UI impact is observed.
Potential Cause:
Mismatch between the documentation and the actual prop validation logic implemented in the component.
Reproduction/example
https://stackblitz.com/edit/github-re46hb2j?file=src%2FApp.jsx
Steps to reproduce
Use the following code:
Open the browser console to observe the warning message.
Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
Third Party Dashboard
Code of Conduct
The text was updated successfully, but these errors were encountered: