Skip to main content
Question

New variants and disabled button for different versions

  • November 9, 2022
  • 1 reply
  • 868 views

Magda_Zawadzka

I a pretty new to the new way of building variants and I came across a problem which, I am sure, might be easy to solve but… I hit the wall.

I am preparing different versions of buttons: outlined, light and dark. With the use of Boolean I can remove one or both of the icons.

Problem: I need to create disabled variant of the button for each version of the button I created. Is there a way to do it with e.g. boolean? I couldn’t figure it out on my own.
Can you help, please as for now I have created a different component set, but I feel this is not the way to go.

1 reply

tank666
  • 4863 replies
  • November 9, 2022

Remove the unused “Disabled” property in your component set. Move variants from one component set to another. Then rename your variants to something like this:

Variant=Outline, Disabled=False
Variant=Outline, Disabled=True
Variant=Light, Disabled=False
Variant=Light, Disabled=True

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