lukejacksonn / oceanwind

Compiles tailwind shorthand into css at runtime. Succeeded by Twind.
https://twind.dev
264 stars 12 forks source link

Document and improve the function interface #13

Closed bebraw closed 4 years ago

bebraw commented 4 years ago

Since I use Oceanwind through a function (not a template), I've ended up with a pattern like this:

ow([combinedClasses.join(" ")])

combinedClasses is an array of classes and to comply with the current API, I have to transform it. Maybe it would be better to have Oceawind to detect the case and work directly with an array like this:

ow(combinedClasses)

It's a bit counter-intuitive to add the array wrapping. Maybe a check or so would be possible.