-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
I think it is difficult to create expected class name string by suitcss-classnames.
static propTypes = {
align: React.PropTypes.oneOf(["left", "center", "right"])
};
render() {
// <Component>--modifier
const names = suitClassNames({
component: this.constructor.name,
modifiers: {
align: this.props.align
}
});
// `Component--alignLeft` is happy!
}ref: suitcss/components-grid: Component CSS for grids
Component--alignLeft is suitabe classname. But, current result is Component--align :(
vs.
const names = suitClassNames({
component: this.constructor.name,
modifiers: {
align: this.props.align
}
});should be Component--alignLeft.
OR
Provide alternative way of creating.
const names = suitClassNames({
component: this.constructor.name,
modifiers: {
[`align${this.props.align}`]: this.props.align
}
});