Skip to content

Commit f2a7432

Browse files
authored
Merge pull request #140 from andytompkins/use-prop-types-package
Switch to using the prop-types package for PropTypes
2 parents 660eb3e + fe3e848 commit f2a7432

File tree

10 files changed

+25
-8
lines changed

10 files changed

+25
-8
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"Swaagie"
99
],
1010
"dependencies": {
11+
"prop-types": "^15.6.0",
1112
"react-base16-styling": "github:dean177/react-base16-styling#fbc6593"
1213
},
1314
"description": "React Native JSON viewing component, based on react-json-tree",

src/ItemRange.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { PureComponent, PropTypes } from 'react';
1+
import React, { PureComponent } from 'react';
2+
import PropTypes from 'prop-types';
23
import { Text, View } from 'react-native';
34
import JSONArrow from './JSONArrow';
45

src/JSONArrayNode.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { PropTypes } from 'react';
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import JSONNestedNode from './JSONNestedNode';
34

45
// Returns the "n Items" string for this node,

src/JSONArrow.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { PropTypes } from 'react';
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import { Text, TouchableOpacity, View } from 'react-native';
34

45
const JSONArrow = ({ arrowStyle, expanded, nodeType, onPress, styling }) => (

src/JSONNestedNode.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { PropTypes } from 'react';
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import { Text, View } from 'react-native';
34
import JSONArrow from './JSONArrow';
45
import getCollectionEntries from './getCollectionEntries';

src/JSONNode.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { PropTypes } from 'react';
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import objType from './objType';
34
import JSONObjectNode from './JSONObjectNode';
45
import JSONArrayNode from './JSONArrayNode';

src/JSONObjectNode.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { PropTypes } from 'react';
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import JSONNestedNode from './JSONNestedNode';
34

45
// Returns the "n Items" string for this node,

src/JSONValueNode.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { PropTypes } from 'react';
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import { Text, View } from 'react-native';
34

45
/**

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { PropTypes } from 'react';
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
23
import { Text, View } from 'react-native';
34
import JSONNode from './JSONNode';
45
import createStylingFromTheme from './createStylingFromTheme';

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4174,6 +4174,14 @@ prop-types@^15.5.10, prop-types@^15.5.6, prop-types@^15.5.8:
41744174
loose-envify "^1.3.1"
41754175
object-assign "^4.1.1"
41764176

4177+
prop-types@^15.6.0:
4178+
version "15.6.0"
4179+
resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
4180+
dependencies:
4181+
fbjs "^0.8.16"
4182+
loose-envify "^1.3.1"
4183+
object-assign "^4.1.1"
4184+
41774185
prr@~0.0.0:
41784186
version "0.0.0"
41794187
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"

0 commit comments

Comments
 (0)