Theming nested instances

I have a component, let’s say a button, that has a theme and an optional icon variant. There are multiple icons to swap with, each with its own theme variant (light and dark).

To my surprise, I’m struggling to set up the button variants such that if the theme is changed, whatever icon is selected will also change to the corresponding theme. As you can see in the above image, the icon themes in the buttons are linked. This is further shown in the below video.

Any advice would be greatly appreciated!

Here’s the sample file:

You can see the way to achieve the desired result, which I added to your file.

1 Like