diff --git a/package.json b/package.json index adf6fcd..0b1ac19 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "less": "^2.7.2", "live-server": "^1.2.0", "mocha": "^3.2.0", + "prop-types": "^15.7.1", "react": "^15.4.2", "react-dom": "^15.4.2" }, diff --git a/src/NPSInput.js b/src/NPSInput.js index 3af26be..31705cd 100644 --- a/src/NPSInput.js +++ b/src/NPSInput.js @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); const classNames = require('classnames'); const NPSScale = require('./NPSScale'); @@ -8,11 +9,11 @@ const NPSScale = require('./NPSScale'); */ const NPSInput = React.createClass({ propTypes: { - animated: React.PropTypes.bool, - service: React.PropTypes.string, - onSubmit: React.PropTypes.func.isRequired, - onDismissed: React.PropTypes.func.isRequired, - children: React.PropTypes.func + animated: PropTypes.bool, + service: PropTypes.string, + onSubmit: PropTypes.func.isRequired, + onDismissed: PropTypes.func.isRequired, + children: PropTypes.func }, getDefaultProps() { diff --git a/src/NPSScale.js b/src/NPSScale.js index afb2efd..5504c27 100644 --- a/src/NPSScale.js +++ b/src/NPSScale.js @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); const classNames = require('classnames'); const MIN = 0; @@ -10,7 +11,7 @@ const MAX = 10; */ const NPSScale = React.createClass({ propTypes: { - onSubmit: React.PropTypes.func.isRequired + onSubmit: PropTypes.func.isRequired }, getDefaultProps() { diff --git a/yarn.lock b/yarn.lock index d66b36a..b3945d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2766,6 +2766,10 @@ object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@ version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + object-keys@^1.0.8: version "1.0.11" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" @@ -2968,6 +2972,13 @@ promise@^7.1.1: dependencies: asap "~2.0.3" +prop-types@^15.7.1: + version "15.7.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.1.tgz#2fa61e0a699d428b40320127733ee2931f05d9d1" + dependencies: + object-assign "^4.1.1" + react-is "^16.8.1" + proxy-middleware@latest: version "0.15.0" resolved "https://registry.yarnpkg.com/proxy-middleware/-/proxy-middleware-0.15.0.tgz#a3fdf1befb730f951965872ac2f6074c61477a56" @@ -3061,6 +3072,10 @@ react-dom@^15.4.2: loose-envify "^1.1.0" object-assign "^4.1.0" +react-is@^16.8.1: + version "16.8.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.1.tgz#a80141e246eb894824fb4f2901c0c50ef31d4cdb" + react@^15.4.2: version "15.4.2" resolved "https://registry.yarnpkg.com/react/-/react-15.4.2.tgz#41f7991b26185392ba9bae96c8889e7e018397ef"