From 56d00c2ec72f00e0e05c722a27de70748f8c826b Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 30 Oct 2015 18:26:22 +0000 Subject: [PATCH] make onFinished required prop for modal contents --- src/skins/vector/views/atoms/ImageView.js | 4 ++++ src/skins/vector/views/organisms/ViewSource.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/skins/vector/views/atoms/ImageView.js b/src/skins/vector/views/atoms/ImageView.js index 6ff88e28..a842f7c8 100644 --- a/src/skins/vector/views/atoms/ImageView.js +++ b/src/skins/vector/views/atoms/ImageView.js @@ -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); diff --git a/src/skins/vector/views/organisms/ViewSource.js b/src/skins/vector/views/organisms/ViewSource.js index 5916967d..371223d4 100644 --- a/src/skins/vector/views/organisms/ViewSource.js +++ b/src/skins/vector/views/organisms/ViewSource.js @@ -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); },