⌈⌋ ⎇ branch:  Bitrhythm


Artifact Content

Artifact 0ffb801b805abc8bc94700d8ccd6a168ee833ed27e4bbbc35fec7faf5fcb69f6:


/**
 * Convert a style object to a string
 * @param   { Object } style - style object we need to parse
 * @returns { String } resulting css string
 * @example
 * styleObjectToString({ color: 'red', height: '10px'}) // => 'color: red; height: 10px'
 */
export default function styleObjectToString(style) {
  return Object.keys(style).reduce((acc, prop) => {
    return `${acc} ${prop}: ${style[prop]};`
  }, '')
}