diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-05-19 18:42:54 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-19 11:42:54 +0200 |
commit | b8b7b506a27ddc1373032078a4f1cfd47242627a (patch) | |
tree | c43ea178901461116913d7cd710e08066f6e3c7a /app/javascript/mastodon/components/icon_button.js | |
parent | 550863198c111d04d463b1fdfcf6d4515ceca1fe (diff) |
Replace inline styles with stylesheet (#3115)
Diffstat (limited to 'app/javascript/mastodon/components/icon_button.js')
-rw-r--r-- | app/javascript/mastodon/components/icon_button.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/javascript/mastodon/components/icon_button.js b/app/javascript/mastodon/components/icon_button.js index b229e5748..c2fbbd4b9 100644 --- a/app/javascript/mastodon/components/icon_button.js +++ b/app/javascript/mastodon/components/icon_button.js @@ -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) { |