summaryrefslogtreecommitdiffstats
path: root/webapp/components/spinner_button.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-03-28 09:41:03 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-03-29 15:18:26 -0400
commit3246d97d5ea00320f9d051318321e156eb0130a0 (patch)
tree6bca338fe860c76ef00f540f5848cfb3010f93f1 /webapp/components/spinner_button.jsx
parentdcdea9f30b419eeb8d55ed9be3f824aaf27de50c (diff)
downloadchat-3246d97d5ea00320f9d051318321e156eb0130a0.tar.gz
chat-3246d97d5ea00320f9d051318321e156eb0130a0.tar.bz2
chat-3246d97d5ea00320f9d051318321e156eb0130a0.zip
Added basic screen to add incoming webhooks
Diffstat (limited to 'webapp/components/spinner_button.jsx')
-rw-r--r--webapp/components/spinner_button.jsx22
1 files changed, 6 insertions, 16 deletions
diff --git a/webapp/components/spinner_button.jsx b/webapp/components/spinner_button.jsx
index fcc9af8cd..becf395c5 100644
--- a/webapp/components/spinner_button.jsx
+++ b/webapp/components/spinner_button.jsx
@@ -14,20 +14,10 @@ export default class SpinnerButton extends React.Component {
};
}
- constructor(props) {
- super(props);
-
- this.handleClick = this.handleClick.bind(this);
- }
-
- handleClick(e) {
- if (this.props.onClick) {
- this.props.onClick(e);
- }
- }
-
render() {
- if (this.props.spinning) {
+ const {spinning, children, ...props} = this.props; // eslint-disable-line no-use-before-define
+
+ if (spinning) {
return (
<img
className='spinner-button__gif'
@@ -38,10 +28,10 @@ export default class SpinnerButton extends React.Component {
return (
<button
- onClick={this.handleClick}
- className='btn btn-sm btn-primary'
+ className='btn btn-primary'
+ {...props}
>
- {this.props.children}
+ {children}
</button>
);
}