[Bug]: ContentSwitcher
docs do not align with component usage
#18276
Labels
adopter: strategic-product
Work-stream that directly effects the Product-led Growth initiative.
component: content-switcher
role: dev 🤖
severity: 3
https://ibm.biz/carbon-severity
type: bug 🐛
Package
@carbon/react
Browser
No response
Package version
1.67.1
React version
No response
Description
size
andselectedIndex
are not required according to the docs: https://react.carbondesignsystem.com/?path=/docs/components-contentswitcher--overview.They are also not listed as required in the
propTypes
:carbon/packages/react/src/components/ContentSwitcher/ContentSwitcher.tsx
Lines 86 to 126 in 03170a8
However, these props are required per the interface for the component:
carbon/packages/react/src/components/ContentSwitcher/ContentSwitcher.tsx
Lines 25 to 65 in 03170a8
Lastly, the prop type for
size
states:A default option shouldn't be necessary on a required property.
Reproduction/example
https://stackblitz.com/edit/github-eslv6tn5?file=src%2FApp.tsx
Steps to reproduce
See the error in the reproduction.
Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
DataPower
Code of Conduct
The text was updated successfully, but these errors were encountered: