make onFinished required prop for modal contents
This commit is contained in:
parent
79af89fd1b
commit
56d00c2ec7
|
@ -26,6 +26,10 @@ var filesize = require('filesize');
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'ImageView',
|
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...
|
// XXX: keyboard shortcuts for managing dialogs should be done by the modal dialog base class somehow, surely...
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
document.addEventListener("keydown", this.onKeyDown);
|
document.addEventListener("keydown", this.onKeyDown);
|
||||||
|
|
|
@ -21,6 +21,10 @@ var React = require('react');
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'ViewSource',
|
displayName: 'ViewSource',
|
||||||
|
|
||||||
|
propTypes: {
|
||||||
|
onFinished: React.PropTypes.func.isRequired
|
||||||
|
},
|
||||||
|
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
document.addEventListener("keydown", this.onKeyDown);
|
document.addEventListener("keydown", this.onKeyDown);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue