You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a react button component, sometimes handling the wide range of variants such as style size disabled state can sometimes intermix and the logic to apply the correct classes can be confusing and complex to write.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When creating a react button component, sometimes handling the wide range of variants such as style size disabled state can sometimes intermix and the logic to apply the correct classes can be confusing and complex to write.
Idea - Allow for arbitrary chaining of classes:
Would generate:
This would mean conditionally you could slap on a
.destructive
class to the button element and the bg-red-500 would be override apply.This would make handling of variants super easier and allow for a more inline/declarative experience for the developer.
Beta Was this translation helpful? Give feedback.
All reactions