Skip to main content
Question

Swap component instances with nested properties


PatJW
  • New Participant
  • 5 replies

I have two sets of icons: one that is solid, and one that is outlined.

As per best practices, I have each icon as a separate component (so I have say, 30 solid icons and 30 outlined icons, making 60 total).

I also have an Icon_wrapper component that uses instance swap, so I can swap out the individual icons.

My question is: instead of showing 60 icons in the preferred list for the instance swap, can I set it up so I can show 30 icons with an additional “Solid/Outline” property to switch between the two versions? That way, I can reduce the number of icons that show up on the list, because they aren’t sorted.

Using “expose nested instances” in the Icon_wrapper component only lets me change the Solid/Outline property of the icon I have in there as default, and not any instances I swap into it with. Is there another way to do this?

This topic has been closed for comments

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