Problem
The shared Icon component is monolithic: standard SVG rendering, inline text layout, multi-gesture canvas support, and four boolean size props all live in one file. That makes the component harder to maintain, test, and migrate, and it blocks follow-up work to move rare call-site variants onto dedicated components and migrate the rest to a simpler BaseIcon API.
Solution
Extract focused primitives (BaseIcon, InlineIcon, MultiGestureIcon) with supporting hooks and shared types. Add a size prop backed by CONST.ICON_SIZE that replaces the deprecated extraSmall/small/medium/large booleans via a resolveIconSize adapter, and update getIconWidthAndHeightStyle to accept the new size enum. Keep the inline and enableMultiGestureCanvas branches in Icon unchanged for backward compatibility — M2 and M3 migrate those call sites out.
PR
#95048
Dependencies
Unblocks [M2] and [M3] sub-issues under the parent tracking issue.
Issue Owner
Current Issue Owner: @eh2077
Problem
The shared
Iconcomponent is monolithic: standard SVG rendering, inline text layout, multi-gesture canvas support, and four boolean size props all live in one file. That makes the component harder to maintain, test, and migrate, and it blocks follow-up work to move rare call-site variants onto dedicated components and migrate the rest to a simplerBaseIconAPI.Solution
Extract focused primitives (
BaseIcon,InlineIcon,MultiGestureIcon) with supporting hooks and shared types. Add asizeprop backed byCONST.ICON_SIZEthat replaces the deprecatedextraSmall/small/medium/largebooleans via aresolveIconSizeadapter, and updategetIconWidthAndHeightStyleto accept the new size enum. Keep theinlineandenableMultiGestureCanvasbranches inIconunchanged for backward compatibility — M2 and M3 migrate those call sites out.PR
#95048
Dependencies
Unblocks [M2] and [M3] sub-issues under the parent tracking issue.
Issue Owner
Current Issue Owner: @eh2077