Beta: Filter, variants and functions are inherited to children
Pre-release
Pre-release
secretlifeof
released this
25 Aug 18:24
·
84 commits
to master
since this release
Nest filter & functions within with
const Boxy = Box.with(({bColor}) => ({bg: bColor}), ['bColor'])
const Boxa = Boxy.with()
// bColor will be removed from the DOM
<Boxa bColor="green">Green background</Boxa>
Nest variants
const Color = Box.variants({
variant: {
green: {
color: 'green',
},
blue: {
color: 'blue',
},
},
}).with({ p: '0.5rem' })
const Variant = Color.with()
<Variant variant="blue">Blue</Variant>