Color change when swap components

Hello,
Is there a way to preserve a specific color in a component when swap one of its child elements? For example, consider a button. As shown in the screenshot, the button uses text and icon colors from a palette. Initially, all icons are set to #000, but I applied a color override in the button component. Shouldn’t the icons retain the overridden color when swapping? I noticed some svg attributes, but it seems attributes related to currentColor are not being passed

1 Like

Figma offers a solution for such overrides: by maintaining the same naming and nesting structure, color changes during swaps are applied correctly:

1 Like

I asked this same question a while back and never got an answer. The icon stays independent from the component, so color, size, etc, are not inherited from the component but from the icon itself. I’m convinced there really is no way of doing it short of building out a component with every icon you ever want to use in the right color and right size. I don’t have time to do that, so unfortunately, I had to go back to Figma to get the design working the way I wanted to.