Open matthew-ia opened 1 year ago
In terms of styling, even this kind of sucks to extend. It works fine for the basic styles, and then if you need to add style-related props that act as modifiers it works pretty well, but defining a new "kind" kinda sucks bc of how much you have to repeat and port from the main button styles.
I wonder if there's a better way to extend the styles via style props instead, so you can more easily define either unique button instances, or just more easily define new reusable "kinds".
Some ideas to make
<Button>
better:Apply variants via prop flags instead of strings values.
This updated code adds more props and
class:
directives to the markup, for each variant property.Let's you do this:
Instead of:
Include a way to control the hover state from a parent.
E.g., say I have a Card, and within it a Button, and on hover of the entire Card, I want the Button to turn purple.