From 3ab89b4cae0cf5b8d965a04016cd1091f2d65362 Mon Sep 17 00:00:00 2001 From: catarak Date: Mon, 27 Jun 2016 16:03:22 -0400 Subject: [PATCH] add proptypes to editor and preview --- client/modules/IDE/components/Editor.js | 8 +++++++- client/modules/IDE/components/Preview.js | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/client/modules/IDE/components/Editor.js b/client/modules/IDE/components/Editor.js index 416d1c81..e7cb8647 100644 --- a/client/modules/IDE/components/Editor.js +++ b/client/modules/IDE/components/Editor.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { PropTypes } from 'react'; import CodeMirror from 'codemirror'; import 'codemirror/mode/javascript/javascript'; import 'codemirror/addon/selection/active-line'; @@ -40,4 +40,10 @@ class Editor extends React.Component { } } +Editor.propTypes = { + content: PropTypes.string.isRequired, + updateFile: PropTypes.func.isRequired, + fontSize: PropTypes.number.isRequired +}; + export default Editor; diff --git a/client/modules/IDE/components/Preview.js b/client/modules/IDE/components/Preview.js index aea0132f..5db7d07f 100644 --- a/client/modules/IDE/components/Preview.js +++ b/client/modules/IDE/components/Preview.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { PropTypes } from 'react'; class Preview extends React.Component { componentDidMount() { @@ -17,4 +17,8 @@ class Preview extends React.Component { } } +Preview.propTypes = { + content: PropTypes.string.isRequired +}; + export default Preview;