-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support additional use cases #2
Comments
Thanks for your feedback and sorry for the late reply - somehow I wasn't subscribed to notifications for my own repo 😛
I'm not entirely sure, but I think this might require some updates to some of the deeper internals of the plugin. I don't know how easily I can decouple the sorting parts from the part that splits out or parses the classname string. Can't make any promises, but I will investigate it further. String syntax should still work though: const button = cva("font-semibold border rounded", {
variants: {
intent: {
primary: "bg-blue-500 text-white border-transparenthover:bg-blue-600",
// ...
So far I've only implemented that feature in my PR to the upstream package - not here in the fork itself. I was optimistically hoping to be able to decommission this package in favor of moving these features upstream instead, so I hadn't prioritized it. It's pretty easy to add though. I need to pull in the latest changes from the upstream package anyway, so I can add this feature when I do (should hopefully be soon)
Targeting method names makes sense to me, but I wonder whether or not it would be necessary to allow targeting based on the parent name too. I'm not sure what the configuration should look like if, for example, we wanted to restrict it to methods named Maybe just the method name is enough though 🤔 |
Tagged template support is released in v0.2.1 (prettier setting |
Thank you for making this fork and upstreaming your changes 🎉
There’s a couple use cases I think would be wonderful to have:
cva
array syntaxwindstitch
/stylemapper
syntaxtw
syntaxI think you already support the
tw
syntax viatailwindTaggedTemplates
. That’s already a really good escape hatch 😄 unfortunately, I couldn’t try it since I couldn’t get the fork to work locallyThe
cva
array syntax could be an additional option named something liketailwindArrayTemplates
and looks like:The
windstitch
syntax withw.componentname
doesn’t seem to be supported withtailwindCustomFunctions
, and I was unable to get your fork withtailwindFunctionCalls
working locally. I think the same option name could be used, or another one liketailwindMethodCalls
could be added. The syntax looks like:The text was updated successfully, but these errors were encountered: