Skip to content

Support for react 16 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
13 changes: 7 additions & 6 deletions src/components/OverlayTrigger.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 { uniqueId } from '../utils';

class OverlayTrigger extends React.Component {
Expand Down Expand Up @@ -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;
23 changes: 12 additions & 11 deletions src/components/PositionProvider.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 ToolTipArrow from './ToolTipArrow';

import { DEFAULT_ARROW_MARGIN, POSITION, SIZE, BOUNDARY, CLASSES } from '../constants';
Expand Down Expand Up @@ -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;
25 changes: 13 additions & 12 deletions src/components/ToolTip.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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;
5 changes: 3 additions & 2 deletions src/components/ToolTipArrow.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 { capitalize } from '../utils';
import { POSITION } from '../constants';

Expand Down Expand Up @@ -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;