Skip to content

[Due for payment 2026-07-17] [M1] Split Icon into primitives #95156

Description

@mountiny

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 OwnerCurrent Issue Owner: @eh2077

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
SUBISSUE

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions