Skip to content

Commit

Permalink
Update to React 15.5 (use prop-types)
Browse files Browse the repository at this point in the history
  • Loading branch information
tajo committed Apr 20, 2017
1 parent 2371c21 commit 7f6c04e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
],
"author": "James Kyle <[email protected]>",
"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",
Expand Down Expand Up @@ -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",
Expand Down
15 changes: 8 additions & 7 deletions src/Modal.js
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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 = {
Expand Down

0 comments on commit 7f6c04e

Please sign in to comment.