diff options
Diffstat (limited to 'app/assets/javascripts/components/components/button.jsx')
-rw-r--r-- | app/assets/javascripts/components/components/button.jsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/assets/javascripts/components/components/button.jsx b/app/assets/javascripts/components/components/button.jsx index e70382142..9e276cbe8 100644 --- a/app/assets/javascripts/components/components/button.jsx +++ b/app/assets/javascripts/components/components/button.jsx @@ -5,14 +5,12 @@ const Button = React.createClass({ propTypes: { text: React.PropTypes.string.isRequired, onClick: React.PropTypes.func, - disabled: React.PropTypes.boolean + disabled: React.PropTypes.bool }, mixins: [PureRenderMixin], handleClick (e) { - e.preventDefault(); - if (!this.props.disabled) { this.props.onClick(); } @@ -20,9 +18,9 @@ const Button = React.createClass({ render () { return ( - <a href='#' onClick={this.handleClick} style={{ display: 'inline-block', position: 'relative', boxSizing: 'border-box', textAlign: 'center', border: '10px none', backgroundColor: '#2b90d9', color: '#fff', fontSize: '14px', fontWeight: '500', letterSpacing: '0', textTransform: 'uppercase', padding: '0 16px', height: '36px', cursor: 'pointer', lineHeight: '36px', borderRadius: '4px', textDecoration: 'none' }}> + <button className='button' disabled={this.props.disabled} onClick={this.handleClick} style={{ display: 'inline-block', position: 'relative', boxSizing: 'border-box', textAlign: 'center', border: '10px none', color: '#fff', fontSize: '14px', fontWeight: '500', letterSpacing: '0', textTransform: 'uppercase', padding: '0 16px', height: '36px', cursor: 'pointer', lineHeight: '36px', borderRadius: '4px', textDecoration: 'none' }}> {this.props.text} - </a> + </button> ); } |