UNPKG

react-style-px-suffix-codemod

Version:

append px to shorthand values in style objects in react in prep for react 15 warning

35 lines (34 loc) 772 B
import React from 'react'; class Cool extends React.Component { render() { const style = { "animationIterationCount": 10, "boxFlex": 10, "boxFlexGroup": 10, "boxOrdinalGroup": 10, "columnCount": 10, "fillOpacity": 10, "flex": 10, "flexGrow": 10, "flexPositive": 10, "flexShrink": 10, "flexNegative": 10, "flexOrder": 10, "fontWeight": 10, "lineClamp": 10, "lineHeight": 10, "opacity": 10, "order": 10, "orphans": 10, "stopOpacity": 10, "strokeDashoffset": 10, "strokeOpacity": 10, "strokeWidth": 10, "tabSize": 10, "widows": 10, "zIndex": 10, "zoom": 10 }; return <div style={style}>Hello</div>; } }