Closed rawnly closed 1 year ago
Given the following configuration
const grid = tv({ variants: { documents: { true: {}, } }, defaultVariants: { documents: true }, slots: { general: 'col-span-7 row-span-4 card', chart: 'card !px-0 col-span-5 relative row-span-4', documents: 'row-span-6 col-span-5 card', flow: 'relative row-span-6 card' }, compoundSlots: [ // { // slots: ['documents', 'chart', 'general', 'flow'], // className: 'bg-violet-10', // documents: false // }, { documents: false, slots: ['documents'], className: 'hidden' }, { documents: false, slots: ['flow'], className: 'col-span-12' }, { documents: true, slots: ['flow'], className: 'col-span-7' } ] }) // usage later const { general, flow, documents, chart } = grid({ documents: true }) // i'd expect to have `col-span-12` applied below // jsx <div className={flow()} />
The variants are never applied 🤷♂️ (version 0.1.10). Maybe I misunderstood how to use them?
0.1.10
Also in the docs the size is never specified in the example code
size
I also have the same problem.
I have a fix for this in #83
Given the following configuration
The variants are never applied 🤷♂️ (version
0.1.10
). Maybe I misunderstood how to use them?