@evanrs/map-props

1.1.0 • Public • Published

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;
       `
   })

Readme

Keywords

Package Sidebar

Install

npm i @evanrs/map-props

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

114 kB

Total Files

11

Last publish

Collaborators

  • evanrs