@evanrs/map-props
v1.1.0
Published
Maps props to styles
Downloads
4
Readme
Select css given by
- mapValue[props[prop]]
- mapValue(props[prop], prop, props)
- mapValue
- props[prop]
<StyledComponent hide={!visible} />
mapProps({
color: (propValue, propName, ownProps) =>
css`color: ${propValue}`
})
mapProps({
intent: {
alert: css`color: magenta`,
success: css`color: green`,
default: css`color: blue`,
}
})
mapProps({
block: css`
display: block;
`
})