import { filterEmptyObj , cloneDeep , isEmpty } from '../../utils' ; import { STYLES } from '../index' ; export const stylesTransform = customStyles => { const styles = filterEmptyObj ( cloneDeep ( customStyles ) ) ; if ( isEmpty ( styles ) ) { return '' ; } let styleTemp = '' ; for ( const key in styles ) { const styleKey = STYLES [ `${ key }` ] ; const styleValue = styles [ key ] ; styleTemp += `${ styleKey }:${ styleValue }; ` ; } styleTemp = styleTemp . substring ( 0 , styleTemp . length - 1 ) ; return styleTemp ; } ;