Iāve been STUCK with this icon override issue for a week now and need helpĀ š
Context:
-
I have an icon library structured as so:Ā

Ā
-
In my button component, Iām using instances of thisĀ
iconĀ component and Iām applying specific tokens to override the default icon color.Ā
Whatās working:
-
Switching between icon variants (same size, e.g. 24px ā 24px) works as expected
-
The icon correctly inherits the color token from the button
The issue:
-
When switching icon sizes (e.g. 24px ā 16px), the icon resets to its default color
-
It overrides the token that was being applied from the button
-
This breaks the expected āinherit colorā behavior
What Iāve checked/tried:
-
Verified layer structure is consistent across icons
-
Confirmed the token is applied at the button level (not hardcoded on the icon)
-
Instances behave correctly until the size variant changes
Question:
Is this expected behavior when swapping component instances across different sizes?
Or is there a recommended way to structure icon components/variables so color inheritance is preserved across size changes?
Would love any guidance or examples of how others are handling icon systems with multiple sizes + token-driven color š
