TheMightyPenguin / dessert-box

An utility to create a Box component from your vanilla-extract + sprinkles tokens.
MIT License
343 stars 20 forks source link

[Feature request] reverse the conditions props #18

Open astahmer opened 2 years ago

astahmer commented 2 years ago

Hey, first I wanna say thank you for this package, it's delightful to work with.

I feel like the conditions are a bit repetitive when needing multiple props over the same one, so I thought something like ChakraUI pseudo props would work well.

Here's what's possible atm:

<Box
    color="black
    color={{ hover: 'white' }}
    cursor={{ hover: "pointer"}}
>xxx</Box>

And here's what I think would be nice:

<Box
    color="black
    _hover={{ color: 'white', cursor: 'pointer' }}
>xxx</Box>
TheMightyPenguin commented 2 years ago

@astahmer Hey there! Awesome, really happy to know you're enjoying this library.

Hmm got it, I'd actually enjoy that API, in some of my work projects I also had some co-workers asking for a similar API, so I'll get to cooking something here! 🙌