Skip to content

[bug]: Type mismatch between props and rendered element. #8667

@RodrigoRafaelSantos7

Description

@RodrigoRafaelSantos7

Describe the bug

Fix type mismatch between props and rendered element.

The Empty component is typed to accept React.ComponentProps<"p"> but renders a

element. This type mismatch can lead to confusion and potential type errors if paragraph-specific props are passed.

Apply this diff to fix the type mismatch:

-function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) {
+function EmptyDescription({ className, ...props }: React.ComponentProps<"div">) {
   return (
     <div

Affected component/components

Empty

How to reproduce

Not relevant

Codesandbox/StackBlitz link

No response

Logs

Not Relevant

System Info

Not Relevant

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions