0
0
Fork 0

Replace inline styles with stylesheet (#3115)

This commit is contained in:
Yamagishi Kazutoshi 2017-05-19 18:42:54 +09:00 committed by Eugen Rochko
parent 550863198c
commit b8b7b506a2
13 changed files with 122 additions and 55 deletions

View file

@ -36,18 +36,15 @@ class IconButton extends React.PureComponent {
}
render () {
let style = {
const style = {
fontSize: `${this.props.size}px`,
width: `${this.props.size * 1.28571429}px`,
height: `${this.props.size * 1.28571429}px`,
lineHeight: `${this.props.size}px`,
...this.props.style
...this.props.style,
...(this.props.active ? this.props.activeStyle : {})
};
if (this.props.active) {
style = { ...style, ...this.props.activeStyle };
}
const classes = ['icon-button'];
if (this.props.active) {