Transform a style object to inline string separated by ;
Name | Type | Description | Status | Default |
---|---|---|---|---|
styleObj | { Object } | An object of style to apply | required |
Return { (String) } The string style representation
import styleObject2String from 'coffeekraken-sugar/js/dom/styleObject2String'
const styleString = styleObject2String({
paddingLeft : '20px',
display : 'block'
});
// output => padding-left:20px; display:block;
Author : Olivier Bossel [email protected] https://olivierbossel.com