diff --git a/package.json b/package.json index 40ebaf4..388d861 100644 --- a/package.json +++ b/package.json @@ -24,11 +24,14 @@ ], "author": "James Kyle ", "license": "BSD-3-Clause", + "peerDependencies": { + "react": "^0.14.9 || ^15.0.0-0 || ^16.0.0-0" + }, "dependencies": { "a11y-focus-scope": "^1.1.0", "a11y-focus-store": "^1.0.0", "exenv": "^1.2.0", - "react": "^0.14.2 || ^15.0.0" + "prop-types": "^15.5.8" }, "devDependencies": { "babel-cli": "^6.1.1", @@ -60,6 +63,7 @@ "karma-tape-reporter": "^1.0.3", "minimist": "^1.2.0", "mocha": "^2.3.3", + "react": "^15.5.4", "react-addons-css-transition-group": "^15.0.0", "react-addons-test-utils": "^15.0.0", "react-dom": "^15.0.0", diff --git a/src/Modal.js b/src/Modal.js index b356f78..6536487 100644 --- a/src/Modal.js +++ b/src/Modal.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import focusScope from 'a11y-focus-scope'; import focusStore from 'a11y-focus-store'; import ExecutionEnvironment from 'exenv'; @@ -21,16 +22,16 @@ export default class ReactModal2 extends React.Component { } static propTypes = { - onClose: React.PropTypes.func.isRequired, + onClose: PropTypes.func.isRequired, - closeOnEsc: React.PropTypes.bool, - closeOnBackdropClick: React.PropTypes.bool, + closeOnEsc: PropTypes.bool, + closeOnBackdropClick: PropTypes.bool, - backdropClassName: React.PropTypes.string, - backdropStyles: React.PropTypes.object, + backdropClassName: PropTypes.string, + backdropStyles: PropTypes.object, - modalClassName: React.PropTypes.string, - modalStyles: React.PropTypes.object + modalClassName: PropTypes.string, + modalStyles: PropTypes.object }; static defaultProps = {