[Bug]: Typescript error related to AccordionProps #17401
Labels
area: typescript
component: accordion
role: dev 🤖
severity: 3
https://ibm.biz/carbon-severity
type: bug 🐛
Package
@carbon/react
Browser
Chrome
Package version
v1.65.0
React version
v18.2
Description
I use carbon v1.65.0 (with vite and typescript) and have an accordion using AccordionProps.
When I try to run/build my client - I get these TS errors:
error TS2559: Type '{ children: Element[]; }' has no properties in common with type 'IntrinsicAttributes & AccordionProps'. error TS2559: Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes & AccordionProps'.
Looks like passing children to Accordion isn't supported anymore.
Reproduction/example
https://stackblitz.com/edit/github-lctgtu?file=src%2FApp.tsx
Steps to reproduce
Create a react application with vite, typescript and carbon (latest version v1.65.0).
Create an accordion component using Carbon Accordion and use AccordionProps and the props type. Try to pass children as prop, and you will see the errors.
Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: