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

Alert component forces me to define description prop (React 19) #4445

Closed
zdychacek opened this issue Dec 25, 2024 · 1 comment · Fixed by #4447
Closed

Alert component forces me to define description prop (React 19) #4445

zdychacek opened this issue Dec 25, 2024 · 1 comment · Fixed by #4447
Assignees
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working

Comments

@zdychacek
Copy link

NextUI Version

2.6.10

Describe the bug

When using React 18 this code is TS valid:

<Alert>Hello</Alert>

After upgrading to React 19, TS compiler gives me an error, that description property is required:

error TS2322: Type '{ children: string; }' is not assignable to type 'IntrinsicAttributes & MergeWithAs<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, never>, AlertProps, "div">'. Property 'description' is missing in type '{ children: string; }' but required in type 'Omit<UseAlertProps, "hasContent">'.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

See the report above.

Expected behavior

Expected behavior in React 19 is the same like in React 18.

Screenshots or Videos

No response

Operating System Version

macOS

Browser

Chrome

Copy link

linear bot commented Dec 25, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working
Projects
None yet
2 participants