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]: Typescript error related to AccordionProps #17401

Closed
2 tasks done
orkrichli opened this issue Sep 10, 2024 · 0 comments · Fixed by #17408
Closed
2 tasks done

[Bug]: Typescript error related to AccordionProps #17401

orkrichli opened this issue Sep 10, 2024 · 0 comments · Fixed by #17408

Comments

@orkrichli
Copy link

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.

Screenshot 2024-09-10 at 20 17 59

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants