Modifier names ✨
Adds the ability to create named modifiers
New API looks like...
const styles = styleCollector('button')
.element``
.modifier('primary', props => props.primary)`
color: red;
`;
This approach uses method overloading to allow the modifier name to be optional and provide backward compatibility. Which means, this is also allowed and works 🎉
const styles = styleCollector('button')
.element``
.modifier('props => props.primary)`
color: red;
`;