Skip to content

Commit 2476406

Browse files
EnriqueVidalrgbkrk
authored andcommitted
Remove PropTypes deprecation errors in React 15.3 (#24)
1 parent 40d7ef3 commit 2476406

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"escape-carriage": "^1.0.1"
3535
},
3636
"peerDependencies": {
37-
"react": "^0.14.0 || ^15.0.0-0"
37+
"prop-types": "^15.5.9",
38+
"react": "^15.0.0-0"
3839
},
3940
"devDependencies": {
4041
"babel-cli": "^6.8.0",

src/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const React = require('react');
2+
const PropTypes = require('prop-types');
23
const Anser = require('anser');
34
const escapeCarriageReturn = require('escape-carriage');
45

@@ -71,7 +72,7 @@ function Ansi(props) {
7172
return React.createElement(
7273
'code',
7374
{},
74-
props.linkify
75+
props.linkify
7576
? ansiToInlineStyle(props.children)
7677
.map(linkifyBundle)
7778
.map(inlineBundleToReact)
@@ -80,7 +81,7 @@ function Ansi(props) {
8081
}
8182

8283
Ansi.propTypes = {
83-
children: React.PropTypes.string,
84+
children: PropTypes.string,
8485
};
8586

8687
module.exports = Ansi;

0 commit comments

Comments
 (0)