Replace inline styles with stylesheet (#3115)
This commit is contained in:
parent
550863198c
commit
b8b7b506a2
13 changed files with 122 additions and 55 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue