about summary refs log tree commit diff
path: root/app/assets/javascripts/components/components/icon_button.jsx
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-30 00:00:45 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-30 00:00:45 +0200
commitef2b50c9acf8bdc2119bfe3d8fe127d92f32c0a7 (patch)
tree932297efa748fcc0578303a12829246ddf0f3836 /app/assets/javascripts/components/components/icon_button.jsx
parenta41c3487bd0564d0a27be5e3937aaf898e34f6f3 (diff)
Deleting statuses from UI
Diffstat (limited to 'app/assets/javascripts/components/components/icon_button.jsx')
-rw-r--r--app/assets/javascripts/components/components/icon_button.jsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/components/icon_button.jsx b/app/assets/javascripts/components/components/icon_button.jsx
index b7f2366ba..509192260 100644
--- a/app/assets/javascripts/components/components/icon_button.jsx
+++ b/app/assets/javascripts/components/components/icon_button.jsx
@@ -26,8 +26,16 @@ const IconButton = React.createClass({
   },
 
   render () {
+    const style = {
+      display: 'inline-block',
+      fontSize: `${this.props.size}px`,
+      width: `${this.props.size}px`,
+      height: `${this.props.size}px`,
+      lineHeight: `${this.props.size}px`
+    };
+
     return (
-      <a href='#' title={this.props.title} className={`icon-button ${this.props.active ? 'active' : ''}`} onClick={this.handleClick} style={{ display: 'inline-block', fontSize: `${this.props.size}px`, width: `${this.props.size}px`, height: `${this.props.size}px`, lineHeight: `${this.props.size}px`}}>
+      <a href='#' title={this.props.title} className={`icon-button ${this.props.active ? 'active' : ''}`} onClick={this.handleClick} style={style}>
         <i className={`fa fa-fw fa-${this.props.icon}`}></i>
       </a>
     );