Skip to content

fix(empty): correct EmptyDescription prop type from ComponentProps<"p"> to ComponentProps<"div">#11058

Open
FrancoKaddour wants to merge 1 commit into
shadcn-ui:mainfrom
FrancoKaddour:fix/empty-description-type-mismatch
Open

fix(empty): correct EmptyDescription prop type from ComponentProps<"p"> to ComponentProps<"div">#11058
FrancoKaddour wants to merge 1 commit into
shadcn-ui:mainfrom
FrancoKaddour:fix/empty-description-type-mismatch

Conversation

@FrancoKaddour

Copy link
Copy Markdown

EmptyDescription renders a

element but its function signature types props as React.ComponentProps<"p">. Every other sub-component in the Empty family correctly matches its type annotation to its rendered element EmptyTitle, EmptyContent, EmptyHeader, etc. all use ComponentProps<"div">).

This inconsistency means the type annotation misrepresents what the component actually renders. The fix is to align the type with the rendered element across all 21 theme variants (new-york-v4, base, radix, and all style variants).

No behavior change — purely a type correction.

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@FrancoKaddour is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

… ComponentProps<"div">

EmptyDescription renders a <div> element but was typed as
React.ComponentProps<"p">. All other Empty sub-components correctly
match their type annotation to their rendered element. Fixed across
all 21 theme variants.
@FrancoKaddour FrancoKaddour force-pushed the fix/empty-description-type-mismatch branch from 457f663 to c456d16 Compare June 30, 2026 13:40
@FrancoKaddour FrancoKaddour marked this pull request as ready for review June 30, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant