diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-03-30 10:05:26 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-03-30 10:05:26 -0400 |
commit | 2ab4581d5e658b22c4a957ec57bb3530f92ad66b (patch) | |
tree | 4202ebdcbc92905873a15d90a6fb68464bb1629f /webapp/components/spinner_button.jsx | |
parent | fcc80818a8afb6f1e2f9974916f02d5fdeb72ec8 (diff) | |
parent | 6a101292c74d33e542e47f8e54fff5a5389bf2ef (diff) | |
download | chat-2ab4581d5e658b22c4a957ec57bb3530f92ad66b.tar.gz chat-2ab4581d5e658b22c4a957ec57bb3530f92ad66b.tar.bz2 chat-2ab4581d5e658b22c4a957ec57bb3530f92ad66b.zip |
Merge pull request #2561 from hmhealey/plt1736
PLT-1736 Initial Backstage Work
Diffstat (limited to 'webapp/components/spinner_button.jsx')
-rw-r--r-- | webapp/components/spinner_button.jsx | 22 |
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> ); } |