Closed d3dc closed 6 years ago
This PR adds support for tailwind variants by allowing objects in cx prop values.
cx
<Box w={[ 'full', { md: '4/5', lg: '3/5' } ]} />
The key names of any object are prefixed to the prop name and the object values are appended following the same rules as every other normal value.
w-full md:w-4/5 lg:w-3/5
Things to consider:
col-md-6
Card={ header: 'bold', border: 'md' } => Card__header-bold Card__border-md
Trying to publish this under the next tag... 🤞
npm install classier-react@next
Merging as the simple-blocks branch will allow transformFn to be changed.
simple-blocks
note nested variants are not defined behavior
This PR adds support for tailwind variants by allowing objects in
cx
prop values.The key names of any object are prefixed to the prop name and the object values are appended following the same rules as every other normal value.
Things to consider:
col-md-6
Card={ header: 'bold', border: 'md' } => Card__header-bold Card__border-md