diff --git a/package.json b/package.json index 7d190e4..edfecb2 100644 --- a/package.json +++ b/package.json @@ -58,11 +58,12 @@ "webpack-hot-middleware": "^2.12.2" }, "peerDependencies": { - "react": "^15.3.0", - "react-dom": "^15.3.0" + "react": "15-16", + "react-dom": "15-16" }, "dependencies": { - "react-portal": "^3.0.0" + "prop-types": "^15.6.0", + "react-portal": "^4.1.2" }, "nyc": { "sourceMap": false, diff --git a/src/components/OverlayTrigger.js b/src/components/OverlayTrigger.js index 59c252b..2a08525 100644 --- a/src/components/OverlayTrigger.js +++ b/src/components/OverlayTrigger.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { uniqueId } from '../utils'; class OverlayTrigger extends React.Component { @@ -130,12 +131,12 @@ class OverlayTrigger extends React.Component { } OverlayTrigger.propTypes = { - closeOnScroll: React.PropTypes.bool, - children: React.PropTypes.element.isRequired, - overlay: React.PropTypes.object.isRequired, - hideLabel: React.PropTypes.string, - showLabel: React.PropTypes.string, - label: React.PropTypes.string, + closeOnScroll: PropTypes.bool, + children: PropTypes.element.isRequired, + overlay: PropTypes.object.isRequired, + hideLabel: PropTypes.string, + showLabel: PropTypes.string, + label: PropTypes.string, }; export default OverlayTrigger; diff --git a/src/components/PositionProvider.js b/src/components/PositionProvider.js index 74bbdd1..a3b1215 100644 --- a/src/components/PositionProvider.js +++ b/src/components/PositionProvider.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import ToolTipArrow from './ToolTipArrow'; import { DEFAULT_ARROW_MARGIN, POSITION, SIZE, BOUNDARY, CLASSES } from '../constants'; @@ -297,17 +298,17 @@ class PositionProvider extends React.Component { } PositionProvider.propTypes = { - children: React.PropTypes.node, - target: React.PropTypes.object, - options: React.PropTypes.object, - position: React.PropTypes.string, - label: React.PropTypes.string, - id: React.PropTypes.string, - arrowSize: React.PropTypes.number, - arrowOffset: React.PropTypes.number, - boundary: React.PropTypes.number, - classes: React.PropTypes.string, - style: React.PropTypes.object, + children: PropTypes.node, + target: PropTypes.object, + options: PropTypes.object, + position: PropTypes.string, + label: PropTypes.string, + id: PropTypes.string, + arrowSize: PropTypes.number, + arrowOffset: PropTypes.number, + boundary: PropTypes.number, + classes: PropTypes.string, + style: PropTypes.object, }; export default PositionProvider; diff --git a/src/components/ToolTip.js b/src/components/ToolTip.js index 48a4a9b..8bd83b7 100644 --- a/src/components/ToolTip.js +++ b/src/components/ToolTip.js @@ -1,5 +1,6 @@ import React from 'react'; -import Portal from 'react-portal'; +import PropTypes from 'prop-types'; +import { Portal } from 'react-portal'; import PositionProvider from './PositionProvider'; @@ -61,17 +62,17 @@ const ToolTip = (props) => { }; ToolTip.propTypes = { - isOpened: React.PropTypes.bool, - readonly: React.PropTypes.bool, - small: React.PropTypes.bool, - onClose: React.PropTypes.func, - trigger: React.PropTypes.object, - id: React.PropTypes.string, - children: React.PropTypes.node, - label: React.PropTypes.string, - position: React.PropTypes.string, - size: React.PropTypes.number, - options: React.PropTypes.object, + isOpened: PropTypes.bool, + readonly: PropTypes.bool, + small: PropTypes.bool, + onClose: PropTypes.func, + trigger: PropTypes.object, + id: PropTypes.string, + children: PropTypes.node, + label: PropTypes.string, + position: PropTypes.string, + size: PropTypes.number, + options: PropTypes.object, }; export default ToolTip; diff --git a/src/components/ToolTipArrow.js b/src/components/ToolTipArrow.js index d282bcf..e10e59c 100644 --- a/src/components/ToolTipArrow.js +++ b/src/components/ToolTipArrow.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { capitalize } from '../utils'; import { POSITION } from '../constants'; @@ -49,8 +50,8 @@ const ToolTipArrow = (props) => { }; ToolTipArrow.propTypes = { - options: React.PropTypes.object, - foreground: React.PropTypes.bool, + options: PropTypes.object, + foreground: PropTypes.bool, }; export default ToolTipArrow;