Skip to content

fix(react-native): align Icon props with SVG types#1090

Merged
georgewrmarshall merged 2 commits intomainfrom
fix/rn-icon-type-props
Apr 16, 2026
Merged

fix(react-native): align Icon props with SVG types#1090
georgewrmarshall merged 2 commits intomainfrom
fix/rn-icon-type-props

Conversation

@georgewrmarshall
Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall commented Apr 16, 2026

Description

Cherry-picks the React Native Icon type fix out of #844 into a focused PR.

This updates IconProps to align with react-native-svg (Omit<SvgProps, 'color' | 'name'> instead of ViewProps).

Also adds migration guidance in packages/design-system-react-native/MIGRATION.md for consumers that were passing View-specific props to Icon.

Related issues

Fixes:

Manual testing steps

  1. Pull this branch.
  2. Open packages/design-system-react-native/src/components/Icon/Icon.types.ts and confirm IconProps extends Omit<SvgProps, 'color' | 'name'>.
  3. Open packages/design-system-react-native/MIGRATION.md and confirm the new Icon migration note under From version 0.18.0 to 0.19.0.

Screenshots/Recordings

N/A (type-only + docs update)

Before

N/A

After

N/A

Pre-merge author checklist

  • I've followed MetaMask Contributor Docs
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@georgewrmarshall georgewrmarshall marked this pull request as ready for review April 16, 2026 21:03
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner April 16, 2026 21:03
@georgewrmarshall georgewrmarshall enabled auto-merge (squash) April 16, 2026 21:03
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@georgewrmarshall georgewrmarshall merged commit 689c26b into main Apr 16, 2026
44 checks passed
@georgewrmarshall georgewrmarshall deleted the fix/rn-icon-type-props branch April 16, 2026 23:33
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.

2 participants