Skip to content

fix(scraps): omit type from SVGIconProps#111353

Merged
natemoo-re merged 4 commits intomasterfrom
scraps/fix/svg-type
Mar 24, 2026
Merged

fix(scraps): omit type from SVGIconProps#111353
natemoo-re merged 4 commits intomasterfrom
scraps/fix/svg-type

Conversation

@natemoo-re
Copy link
Member

@jaydgoss hit an interesting type issue in #111160

The gist is SVGIconProps extends React.SVGAttributes<SVGSVGElement> which includes type: string, but that's not actually valid for the root <svg> of our icon component.

By omitting type from SVGIconProps, IconGraphProps no longer narrows the type: string prop, so type becomes a new optional prop. The eliminates the variance conflict, so ComponentType<IconGraph> should be directly assignable to SVGIconProps.

@natemoo-re natemoo-re requested a review from a team as a code owner March 23, 2026 21:07
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 23, 2026
Copy link
Member

@JonasBa JonasBa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, iirc we have a few more of these, but one at a time 🫡✅

@natemoo-re natemoo-re enabled auto-merge (squash) March 24, 2026 14:30
@natemoo-re natemoo-re merged commit d8c4ac5 into master Mar 24, 2026
69 checks passed
@natemoo-re natemoo-re deleted the scraps/fix/svg-type branch March 24, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants