Skip to main content
Solved

Two different button types nested inside another component, button label overides are not carrying across variants, how can I make this work?

  • December 11, 2023
  • 2 replies
  • 356 views

Toby_Magrath1

I have a “Contextual menu” component which has three variants. Each use a button type and a menu (list). One uses a primary-button (set to secondary), one uses a “ghost-button” the other an “icon-button”. My issue is if a designer adds their text label when the menu is set to default (primary-button) then switches to “ghost” the label is back to ghost-button’s default label.

The buttons are separate components but they on their own will carry label overrides between them but they don’t seem to be able to do it now that they are nested inside this new component. Is there a way to allow overrides to also be share here?

Below is the components and variant states and the button structure of the nested buttons insode the contextual menu.

Best answer by tank666

Your screenshot doesn’t show the component structure (layers), but it looks like there are layer mismatches somewhere. Try renaming the button instance.

But so that you can get an accurate answer, I suggest you share the link to the test file so that anyone in the community can check it.

View original

2 replies

tank666
  • 4860 replies
  • Answer
  • December 11, 2023

Your screenshot doesn’t show the component structure (layers), but it looks like there are layer mismatches somewhere. Try renaming the button instance.

But so that you can get an accurate answer, I suggest you share the link to the test file so that anyone in the community can check it.


Toby_Magrath1

Yes! that was the issue, stupid me didn’t remane the nested button layer to carry across all variants 🤦‍♂️. Was staring me right in the face. Thank you!!


Reply


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