Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
outlookWidth () {
const { mjAttribute } = this.props
const parentWidth = parseInt(mjAttribute('parentWidth'))
const {width, unit} = widthParser(mjAttribute('width'))
switch (unit) {
case '%': {
return parentWidth * width / 100
}
default: {
return width
}
}
}