Changes to the nested object aren't applied when changing the variant of mother object

Is there a way to keep changes applied to the nested when changing the variant of mother object?

For example I have this component which has nested pill component. If I make changes to child component, like changing the color of this pill this change won’t be applied when I will change variant of this child component.

This should work out of the box without any special tricks.
All you need to ensure is that namings match across variants.

example.fig (62.8 KB)

1 Like

Thanks! I found that what caused the problem was that I changed original color of nested component. Is there a way to have different color than mother component and still be able to change this color and keep it while changing variants?

Depending on what you are exactly aiming for you could do things like this:

example2.fig (33.0 KB)
(I used the base component method and exposed the nested properties)

Thanks! I seem to have still problem with it in my original components but its working on another ones.

Resetting everything often helps.