Is it possible to extract all inline Radium styles to classes so that html doesn't get ugly with all the inline styles?
I have this:
@Radium
class ExtendedComponent extends Component {
render() {
return (
<div style={[styles.color, styles.box]}</div>
);
}
}
const styles = {
color: {
color: green
},
box: {
borderColor: red,
height: '20px',
width: '20px'
}
};
Right now output HTML looks something like this:
<div style="color: green; border-color: red; height: 20px; width: 20px;"></div>
I would for it to be something like:
<div class="c1"></div>
Where the CSS rules would include this:
.c1 {
color: green;
border-color: red;
height: 20px;
width: 20px;
}