Skip to content

Commit 9080217

Browse files
apaatsioeddywashere
authored andcommitted
fix(PropTypes): import PropTypes from prop-types (reactstrap#395)
Using the PropTypes via the react package is deprecated as of React 15.5.0. Use the PropTypes from the prop-types package as recommended. See https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html
1 parent 0ffb819 commit 9080217

69 files changed

Lines changed: 75 additions & 74 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,14 @@
9191
"lodash.isobject": "^3.0.2",
9292
"lodash.omit": "^4.4.1",
9393
"lodash.tonumber": "^4.0.3",
94+
"prop-types": "^15.5.8",
9495
"reactstrap-tether": "1.3.4"
9596
},
9697
"peerDependencies": {
97-
"react": "^0.14.0 || ^15.0.0",
98-
"react-addons-css-transition-group": "^0.14.0 || ^15.0.0",
99-
"react-addons-transition-group": "^0.14.0 || ^15.0.0",
100-
"react-dom": "^0.14.0 || ^15.0.0"
98+
"react": "^0.14.9 || ^15.3.0",
99+
"react-addons-css-transition-group": "^0.14.8 || ^15.3.0",
100+
"react-addons-transition-group": "^0.14.8 || ^15.3.0",
101+
"react-dom": "^0.14.9 || ^15.3.0"
101102
},
102103
"devDependencies": {
103104
"babel-cli": "^6.14.0",

src/Alert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import classNames from 'classnames';
34
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
45
import { mapToCssModules } from './utils';
56

6-
const { PropTypes } = React;
77
const FirstChild = ({ children }) => (
88
React.Children.toArray(children)[0] || null
99
);

src/Badge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import classNames from 'classnames';
34
import { mapToCssModules } from './utils';
45

5-
const { PropTypes } = React;
66
const propTypes = {
77
color: PropTypes.string,
88
pill: PropTypes.bool,

src/Breadcrumb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import classNames from 'classnames';
34
import { mapToCssModules } from './utils';
45

5-
const { PropTypes } = React;
66
const propTypes = {
77
tag: PropTypes.string,
88
className: PropTypes.string,

src/BreadcrumbItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import classNames from 'classnames';
34
import { mapToCssModules } from './utils';
45

5-
const { PropTypes } = React;
66
const propTypes = {
77
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
88
active: PropTypes.bool,

src/Button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import classNames from 'classnames';
34
import { mapToCssModules } from './utils';
45

5-
const { PropTypes } = React;
66
const propTypes = {
77
active: PropTypes.bool,
88
block: PropTypes.bool,

src/ButtonDropdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import Dropdown from './Dropdown';
34

4-
const { PropTypes } = React;
55
const propTypes = {
66
children: PropTypes.node,
77
};

src/ButtonGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import classNames from 'classnames';
34
import { mapToCssModules } from './utils';
45

5-
const { PropTypes } = React;
66
const propTypes = {
77
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
88
'aria-label': PropTypes.string,

src/ButtonToolbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import classNames from 'classnames';
34
import { mapToCssModules } from './utils';
45

5-
const { PropTypes } = React;
66
const propTypes = {
77
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
88
'aria-label': PropTypes.string,

src/Card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import classNames from 'classnames';
34
import { mapToCssModules } from './utils';
45

5-
const { PropTypes } = React;
66
const propTypes = {
77
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
88
inverse: PropTypes.bool,

0 commit comments

Comments
 (0)