You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{styled}from"@twind/react"interfaceIAutoGridProps{amount: number;minWidth: number;maxWidth: number;}constAutoGrid=styled('div',{// New property that accepts a function which is passed all propscss: ({ amount, minWidth, maxWidth }: IAutoGridProps)=>({gridTemplateColumns: `repeat(${amount}, minmax(${minWidth}, ${maxWidth}))`})})
The text was updated successfully, but these errors were encountered:
I think the css method should take a second parameter and it is type would be the variants. I think there are some scenarios where it is needed.
import{styled}from"@twind/react"interfaceIAutoGridProps{amount: number;minWidth: number;maxWidth: number;}constAutoGrid=styled('div',{variants: {a: {1: "",2: ""},b: {3: "",2: ""}}// New property that accepts a function which is passed all props// The type of the second argument would be { a: 1 | 2, b: 3 | 2 }css: ({ amount, minWidth, maxWidth }: IAutoGridProps,{ a, b })=>({gridTemplateColumns: `repeat(${amount}, minmax(${minWidth}, ${maxWidth}))`})})
And also all properties for the css method should have variants for them.
The text was updated successfully, but these errors were encountered: