unovue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
4.89k stars 280 forks source link

How do I export the buttonVariants to another Vue component in Nuxt 3? #218

Closed endan-917v closed 10 months ago

endan-917v commented 10 months ago

https://www.shadcn-vue.com/docs/components/button.html

In the React version of the library, you can import buttonVariants to other components. Is there a way to do that in Nuxt 3? It seems like you can't export in the script setup tag either.

nikuscs commented 10 months ago

My recommendation is to detach the styles yourself into a separate file, i usually create a design.ts file with the cva/cv defenitions there, so its way more portable

endan-917v commented 10 months ago

Thank you for your reply! I did that instead. 👍