Skip to main content
Question

Why icon instances are not preserving overrides only when I'm consuming them from a library?


Ze_Zorzan

So, I’ve created some icons using variants. It looks like this:


(How the layers are organized, the Icon layer is an Union)

image
(Properties of each icon)

Then, I created a button component with different sizes and states using a placeholder icon:

image

image

When I create an instance of the button in the same file (local component), I can swap the icon in the button and it preserves the icon properties:


(In this case, the properties were: Small, Filled)

But, when I use the same component in another file (now consuming from the original file, as a library), I can’t do the same:


(The icon properties got resetted)

Am I doing something wrong? Why the different behaviors when instancing inside the file and outside of it?

This topic has been closed for replies.

3 replies

dennsi
  • Active Member
  • 257 replies
  • June 8, 2022

Can you provide an example file to check this out in detail?


Alborz_Heydaryan1

I have a huge problem with this. The icons I put in my buttons can have inconsistent line thickness and colour. Tried a few different methods to fix with mixed results. but nothing works 100% so far. I wish it just tool all the properties from the component and applied it to the button sub-component by default.


zan2
  • New Member
  • 7 replies
  • November 12, 2024

Did you ever find a fix for this? Sounds like I’m having the same issue - Instance swapped icons don't preserve across variants?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings