Skip to content
Snippets Groups Projects
Commit 22f54696 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Update to new proptypes style

parent b2c507be
Branches
Tags
No related merge requests found
const PropTypes = require('prop-types');
const React = require('react');
const ReactModal = require('react-modal');
const Box = require('../box/box.jsx');
......@@ -47,17 +48,13 @@ const PromptComponent = props => (
);
PromptComponent.propTypes = {
label: React.PropTypes.string.isRequired,
onCancel: React.PropTypes.func.isRequired,
onChange: React.PropTypes.func.isRequired,
onKeyPress: React.PropTypes.func.isRequired,
onOk: React.PropTypes.func.isRequired,
placeholder: React.PropTypes.string,
title: React.PropTypes.string.isRequired
};
PromptComponent.defaultProps = {
placeholder: '...'
label: PropTypes.string.isRequired,
onCancel: PropTypes.func.isRequired,
onChange: PropTypes.func.isRequired,
onKeyPress: PropTypes.func.isRequired,
onOk: PropTypes.func.isRequired,
placeholder: PropTypes.string,
title: PropTypes.string.isRequired
};
module.exports = PromptComponent;
const PropTypes = require('prop-types');
const React = require('react');
const bindAll = require('lodash.bindall');
const PromptComponent = require('../components/prompt/prompt.jsx');
......@@ -43,15 +44,11 @@ class Prompt extends React.Component {
}
Prompt.propTypes = {
label: React.PropTypes.string.isRequired,
onCancel: React.PropTypes.func.isRequired,
onOk: React.PropTypes.func.isRequired,
placeholder: React.PropTypes.string,
title: React.PropTypes.string.isRequired
};
PromptComponent.defaultProps = {
placeholder: '...'
label: PropTypes.string.isRequired,
onCancel: PropTypes.func.isRequired,
onOk: PropTypes.func.isRequired,
placeholder: PropTypes.string,
title: PropTypes.string.isRequired
};
module.exports = Prompt;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment