Cleaning up action names and compose drawer
This commit is contained in:
parent
92afd29650
commit
72591cc6d5
29 changed files with 468 additions and 151 deletions
|
@ -1,12 +1,21 @@
|
|||
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||||
|
||||
const Button = React.createClass({
|
||||
|
||||
propTypes: {
|
||||
text: React.PropTypes.string.isRequired,
|
||||
onClick: React.PropTypes.func
|
||||
onClick: React.PropTypes.func,
|
||||
disabled: React.PropTypes.boolean
|
||||
},
|
||||
|
||||
mixins: [PureRenderMixin],
|
||||
|
||||
handleClick (e) {
|
||||
e.preventDefault();
|
||||
this.props.onClick();
|
||||
|
||||
if (!this.props.disabled) {
|
||||
this.props.onClick();
|
||||
}
|
||||
},
|
||||
|
||||
render () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue