vinpac / windstitch

Windstitch is a 1.4kB, Simple Styling Library that helps you set when a className should be applied to a component.
https://windstitch.vercel.app
MIT License
254 stars 6 forks source link

Extend typescript and usage of `Classname creator` #17

Open enyelsequeira opened 1 year ago

enyelsequeira commented 1 year ago

Hello,

I have been testing a few libraries out to see which one is the more robust, or the most stable in order to create different variants, I have used CVA, and I liked it, however it is missing some of the functionality that you have in this library, like the fact that you can create record function variants, which I think are extremely powerful for some edge cases, the thing, that I think might be cool to add to it would be the correct typing and allowing the user to create a function like className if they are using the ClassName creator

so ideally it would be nice, to have something like this api image

I think this would be a really good enhancement for the library, at the moment if I were to try something similar it does not work, with TS

Thoughts 🤔 ?