Skip to content

Commit 11ef98c

Browse files
Anders Hassistaion
authored andcommitted
Use separate prop-types package when upgrading
1 parent 5fbc582 commit 11ef98c

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

src/LinkContainer.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is largely taken from react-router/lib/Link.
2-
32
import React from 'react';
3+
import PropTypes from 'prop-types';
44

55
function isLeftClickEvent(event) {
66
return event.button === 0;
@@ -24,26 +24,26 @@ function createLocationDescriptor(to, query, hash, state) {
2424
}
2525

2626
const propTypes = {
27-
onlyActiveOnIndex: React.PropTypes.bool.isRequired,
28-
to: React.PropTypes.oneOfType([
29-
React.PropTypes.string,
30-
React.PropTypes.object,
27+
onlyActiveOnIndex: PropTypes.bool.isRequired,
28+
to: PropTypes.oneOfType([
29+
PropTypes.string,
30+
PropTypes.object,
3131
]).isRequired,
32-
query: React.PropTypes.string,
33-
hash: React.PropTypes.string,
34-
state: React.PropTypes.object,
35-
action: React.PropTypes.oneOf([
32+
query: PropTypes.string,
33+
hash: PropTypes.string,
34+
state: PropTypes.object,
35+
action: PropTypes.oneOf([
3636
'push',
3737
'replace',
3838
]).isRequired,
39-
onClick: React.PropTypes.func,
40-
active: React.PropTypes.bool,
41-
target: React.PropTypes.string,
42-
children: React.PropTypes.node.isRequired,
39+
onClick: PropTypes.func,
40+
active: PropTypes.bool,
41+
target: PropTypes.string,
42+
children: PropTypes.node.isRequired,
4343
};
4444

4545
const contextTypes = {
46-
router: React.PropTypes.object,
46+
router: PropTypes.object,
4747
};
4848

4949
const defaultProps = {

test/visual/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import Grid from 'react-bootstrap/lib/Grid';
34
import ReactDOM from 'react-dom';
45
import { hashHistory, IndexRedirect, Route, Router } from 'react-router';
@@ -12,7 +13,7 @@ import NavItemVisual from './NavItemVisual';
1213
import 'bootstrap/less/bootstrap.less';
1314

1415
const propTypes = {
15-
children: React.PropTypes.node.isRequired,
16+
children: PropTypes.node.isRequired,
1617
};
1718

1819
const App = ({ children }) => (

0 commit comments

Comments
 (0)