make onFinished required prop for modal contents

This commit is contained in:
Matthew Hodgson 2015-10-30 18:26:22 +00:00
parent 79af89fd1b
commit 56d00c2ec7
2 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,10 @@ var filesize = require('filesize');
module.exports = React.createClass({
displayName: 'ImageView',
propTypes: {
onFinished: React.PropTypes.func.isRequired
},
// XXX: keyboard shortcuts for managing dialogs should be done by the modal dialog base class somehow, surely...
componentDidMount: function() {
document.addEventListener("keydown", this.onKeyDown);

View File

@ -21,6 +21,10 @@ var React = require('react');
module.exports = React.createClass({
displayName: 'ViewSource',
propTypes: {
onFinished: React.PropTypes.func.isRequired
},
componentDidMount: function() {
document.addEventListener("keydown", this.onKeyDown);
},