Closed kevinwolfcr closed 1 year ago
I’m mostly away from my computer for a few days, so thumbing this out on my phone…
but, this library only supports custom utilities in the way shown in the readme. RadixUi is probably doing a lot more under the hood calling out to the plug-in function.
I’m not familiar with that library, but from a quick glance it looks like it’s heavily (maybe only?) geared towards web. This library only aims to support react native for native not react native web. So if you’re targeting RN web and trying to use radix ui, this is probably not the library for you, I doubt it will work for you.
Nope, the library is only to generate some colors, without even using the plugins API.
oh, ok, back at my computer, and looked closer at your code. yeah, the problem is that you're trying to use more of the tailwind api than the plugin supports. basically, we only support the addUtilities
method of the object that gets passed to the plugin function, and only in the way shown in the readme. you're currently destructuring both theme
and addComponents
, both of which are not supported, sorry.
to add a bit more context, I basically implemented just barely enough of the plugin api to allow for custom utilities as shown in the readme. then i threw errors for every other part of the api that tailwind exposes, which is what you're running into here.
that said, if other parts of the plugin api are useful and would integrate well, i'd be open to a PR to add support for them. it wasn't a decision of mine to never do more, just that i got the MVP feature working and moved on, if that makes sense.
closing, feel free to re-open if you have more thoughts, or want to discuss a PR. thanks!
Hello! I have the following
tailwind.config.js
:However, when trying to call the
create(tailwindConfig)
function, I get this error: