Comments (2)
I've tried to setup with similar setting, I can't get the configuration / theme to even work.
import { createApp } from 'vue'
import App from './components/App.vue'
import { variantJS, TButton } from '@variantjs/vue'
let app = createApp(App)
app.mount('#app')
const configuration = {
't-button': {
component: TButton,
props: {
fixedClasses: 'border-2 block w-full rounded text-gray-800',
classes: 'border-2 block w-full rounded text-gray-800'
// ...More settings
}
},
}
app.use(variantJS, configuration)
The classes or fixedClasses will not reflect when I use the component. :(
from vue.
@stephenkhoo docs are incorrect the correct syntax is this:
export const theme = {
TButton: {
// The fixed classes will never change and will be merged with the `classes` value or the active variant
fixedClasses: 'focus:outline-none focus:shadow-outline inline-flex items-center transition ease-in-out duration-150',
// Classes used when any variant is active
classes: 'text-white bg-blue-600 hover:bg-blue-500 focus:border-blue-700 active:bg-blue-700 text-sm font-medium border border-transparent px-3 py-2 rounded-md',
variants: {
error: {
classes: 'text-white bg-red-600 hover:bg-red-500 focus:border-red-700 active:bg-red-700 text-sm font-medium border border-transparent px-3 py-2 rounded-md',
},
success: {
classes: 'text-white bg-green-600 hover:bg-green-500 focus:border-green-700 active:bg-green-700 text-sm font-medium border border-transparent px-3 py-2 rounded-md',
}
}
// ...More settings
},
};
I am updating the docs right now, feel free to open this ticket again if it doesn't work
from vue.
Related Issues (20)
- 🚨🩳 On vacation until November 8th HOT 5
- Treeshaking working? HOT 3
- -
- -
- TDialog not available HOT 1
- yarn-error.log should not be committed HOT 1
- Autofocus Rich select in combination with Modal HOT 3
- TRichSelect changed event is not working HOT 2
- What does useConfiguration exactly do? HOT 4
- How to custom variant for Alert or Button with Laravel Inertia Vue3? HOT 1
- Should TInput have type="text" attribute set by default?
- Demo Source HOT 2
- TRichSelect missing styling HOT 2
- [Vue warn]: Failed to resolve component: t-alert
- [ TRichSelect ] Question / Feature
- TInput Variant not working
- TInputGroup: variants css overwrites props HOT 1
- 🚨 [Important] project status HOT 2
- How to apply the default tailwind css styles to variantjs HOT 1
- can not awoid popperjs/core,
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue.