Artifact Content
Artifact 0ffb801b805abc8bc94700d8ccd6a168ee833ed27e4bbbc35fec7faf5fcb69f6:
- File public/riot-3.13.2/lib/browser/common/util/dom/style-object-to-string.js — part of check-in [12a9bb700d] at 2021-08-11 18:56:04 on branch trunk — Import from git Added a changelog (user: dev size: 412)
/** * 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]};` }, '') }