tailwindcss-vue
tailwindcss-vue copied to clipboard
Theme system
Is it possible to get some explanation on the theme system? And how to change it etc?
Hey, thank you for your interest in the project. Are you able to clone and run the project locally? During the install process you are able to pass in your own theme object that contains the properties needed to style it your own way.
Hey, thank you for your interest in the project. Are you able to clone and run the project locally? During the install process you are able to pass in your own theme object that contains the properties needed to style it your own way.
yes, I understand, but If I'm using for example just the Table component it starts complaining about not having the theme, i basically have to pass the theme-override prop every time i call a component
Do you have an example of how you are including it?
in nuxt for example, I pull a component like this:
import { Button } from '@advanced-data-machines/tailwindcss-vue';
...
components: {
Button,
},
...
The best way to handle that is just install the specific component and override the theme.
import { Button } from '@advanced-data-machines/tailwindcss-vue';
const custom = {
theme: {
TvButton: {
...
}
}
};
Vue.use(Button, custom);
Can also install just an array of components.
import Twv, { Button } from '@advanced-data-machines/tailwindcss-vue';
const components = [Button];
const custom = {
theme: {
TvButton: {
...
}
},
components
};
Vue.use(Twv, custom);
This way you handle the config once.
Let me know if you have other issues or errors.