Skip to content

Instantly share code, notes, and snippets.

@dignifiedquire
Created March 18, 2015 16:11
Show Gist options
  • Save dignifiedquire/b9a6935636851330ab0c to your computer and use it in GitHub Desktop.
Save dignifiedquire/b9a6935636851330ab0c to your computer and use it in GitHub Desktop.
export default React.createClass({
displayName: 'ModalHeader',
propTypes: {
onClose: React.PropTypes.func
},
getDefaultProps() {
return {
onClose: function () {}
}
},
render() {
//...
}
})
export default React.createClass({
displayName: 'ModalConfirm',
propTypes: {
onClose: React.PropTypes.func
},
getDefaultProps() {
return {
onCancel: function (e) {
console.log(e)
}
}
},
render() {
//..
<ModalHeader onClose={this.props.onCancel} />
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment