Guys, I’m having a problem changing the icon in my components, as it’s not following the color change. For example, I create an icon button, and in it I create several states, which can have different cores and when I copy the instance of this component and replace the icon, it does not follow the pre-defined cores of the developed component. Below I will leave a link to a file for anyone who can analyze this behavior, thank you in advance.
Use cmd+e to combine objects into one (flatten) It works as well as in the example below.
Also, you need to make sure that all icons that are available for use have the same exact structure, composition, and layer names. For example: either all your icons are a one object shape vector, or all are a one object stroke vector, etc. If for any reason this is not the case, then you will experience random color glitches while changing instances.