Flow + functional programming = 💩
// Well, shit | |
const verticalModifiers = ['top', 'middle', 'bottom']; | |
const horizontalModifiers = ['start', 'center', 'end']; | |
const modifiers = verticalModifiers.concat(horizontalModifiers); | |
const getPassthroughClassNames = () => modifiers | |
.map(name => [name, props[name]]) | |
.filter(([, value]) => value) | |
.map(([name, value]) => `${name}-${value}`) | |
.map(getClass); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment