How to use the emotion-utils.processStyleName function in emotion-utils

To help you get started, we’ve selected a few emotion-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emotion-js / emotion / packages / babel-plugin-emotion / src / parser.js View on Github external
let flattened = Object.keys(style).reduce((accum, key) => {
    if (Array.isArray(style[key])) {
      accum[key] = style[key].join(`; ${processStyleName(key)}: `)
    } else if (
      Object.prototype.toString.call(style[key]) === '[object Object]'
    ) {
      accum[key] = expandCSSFallbacks(style[key])
    } else {
      accum[key] = style[key]
    }
    return accum
  }, {})
  // todo -

emotion-utils

Shared utilities used by emotion, The Next Generation of CSS-in-JS.

MIT
Latest version published 7 years ago

Package Health Score

78 / 100
Full package analysis