I have a string:
const styleString = 'font-size: 24px; color: #f0f1f2; font-weight: 700;'
and I'd like to create a function which will looks like
const getStyleFromString = (styleString, styleName) => {
// some logics
return styleValue
}
const fontSize = getStyleFromString(styleString, 'font-size') // returns 24px