(Issue) Keep the scaling of a nested component when swapping it

Is this ok? I seem to have found a solution

This may work for some people, but the downsize is you now have to support and maintain more icons (I think I counted 6) because of the size variants you created. What you have is more of a band-aid solution to the root issue.

Ideally, I (and other folks here) would like to be able to swap in a single icon instance and have that scale to whatever the width and height of the swap destination is. That means we set the constraints on just one icon component and never have to worry about it being consumed in an area smaller or larger than the icon component itself because it should scale automatically, including the strokes (If we desire)!

The number of icons will remain the same. You just create a component that is responsible for the size.

Please see my sample file I created earlier:

@arcyia This has been driving me crazy for the last 4 hours… How did you achieve this result? Would you mind sharing this file with us, please? I can’t get the instances of my component to automatically adjust to the variable size of an icon, just like you did…

It seems that the main problem is that I don’t even have the “Hug contents” option for my icon.