Skip to content

Replace SVGProps<SVGSVGElement> with ComponentProps<'svg'>#1016

Open
mfteuscher wants to merge 1 commit into
gregberge:mainfrom
mfteuscher:use-component-props-type
Open

Replace SVGProps<SVGSVGElement> with ComponentProps<'svg'>#1016
mfteuscher wants to merge 1 commit into
gregberge:mainfrom
mfteuscher:use-component-props-type

Conversation

@mfteuscher
Copy link
Copy Markdown

@mfteuscher mfteuscher commented Jan 9, 2026

Summary

The ComponentProps generic type has become the standard for fetching native DOM types in TypeScript. This PR replaces the old SVGProps<SVGSVGElement> prop with the newer ComponentProps<'svg'> type. I personally find it much cleaner than the old way.

Test plan

The new type ComponentProps<'svg'> is backward compatible and equivalent SVGProps<SVGSVGElement>, so there should be no issue with an update. If downstream packages are running tests that use a pure text diff, this could potentially cause issues with a type change, but in terms of functionality, this will cause no breakage in the usage of an SVG

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 9, 2026

@mfteuscher is attempting to deploy a commit to the Greg Berg's projects Team on Vercel.

A member of the Team first needs to authorize it.

@mfteuscher mfteuscher changed the title chore: replace SVGProps<SVGSVGElement> with ComponentProps<'svg'> Replace SVGProps<SVGSVGElement> with ComponentProps<'svg'> Jan 9, 2026
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