Skip to content

Commit

Permalink
change PropTypes reference from React to prop-types package (aksonov#…
Browse files Browse the repository at this point in the history
…1930)

* change PropTypes reference from React to prop-types package

* ajust to eslint constraints
  • Loading branch information
diogoarm authored and aksonov committed Jul 8, 2017
1 parent 7cb1aa9 commit c126b84
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 24 deletions.
3 changes: 2 additions & 1 deletion Example/components/NavigationDrawer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import PropTypes from 'prop-types';
import React from 'react';
import Drawer from 'react-native-drawer';
import { DefaultRenderer, Actions } from 'react-native-router-flux';

Expand Down
5 changes: 2 additions & 3 deletions Example/components/TabIcon.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, {
PropTypes,
} from 'react';
import PropTypes from 'prop-types';
import React from 'react';
import {
Text,
} from 'react-native';
Expand Down
4 changes: 2 additions & 2 deletions Example/components/TabView.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import PropTypes from 'prop-types';
import React from 'react';
import {PropTypes} from "react";
import {StyleSheet, Text, View, ViewPropTypes} from "react-native";
import Button from 'react-native-button';
import { Actions } from 'react-native-router-flux';

const contextTypes = {
drawer: React.PropTypes.object,
drawer: PropTypes.object,
};

const propTypes = {
Expand Down
87 changes: 87 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
],
"dependencies": {
"lodash.isequal": "^4.5.0",
"prop-types": "^15.5.10",
"react-native-experimental-navigation": "^0.28.0",
"react-native-tabs": "^1.0.9",
"react-static-container": "^1.0.1"
Expand All @@ -58,6 +59,10 @@
"react": "*",
"react-native": "*"
},
"peerDependencies": {
"react": "^16.0.0-alpha.6",
"react-native": ">=0.44"
},
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
Expand Down
6 changes: 2 additions & 4 deletions src/DefaultRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
* LICENSE file in the root directory of this source tree.
*
*/
import React, {
PureComponent,
PropTypes,
} from 'react';
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import {
Animated,
View,
Expand Down
5 changes: 2 additions & 3 deletions src/Modal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, {
PropTypes,
} from 'react';
import PropTypes from 'prop-types';
import React from 'react';
import {
View,
} from 'react-native';
Expand Down
5 changes: 2 additions & 3 deletions src/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
import React, {
PropTypes,
} from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import {
Platform,
Animated,
Expand Down
6 changes: 2 additions & 4 deletions src/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
* LICENSE file in the root directory of this source tree.
*
*/
import React, {
Component,
PropTypes,
} from 'react';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { BackHandler } from 'react-native';
import NavigationExperimental from 'react-native-experimental-navigation';

Expand Down
3 changes: 2 additions & 1 deletion src/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* LICENSE file in the root directory of this source tree.
*
*/
import React, { PropTypes } from 'react';
import PropTypes from 'prop-types';
import React from 'react';
import { ViewPropTypes, Text } from 'react-native';

export default class extends React.Component {
Expand Down
3 changes: 2 additions & 1 deletion src/Switch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import PropTypes from 'prop-types';
import React from 'react';
import TabBar from './TabBar';
import Actions from './Actions';

Expand Down
3 changes: 2 additions & 1 deletion src/TabBar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import {
Image,
View,
Expand Down
3 changes: 2 additions & 1 deletion src/TabbedView.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { View, StyleSheet, ViewPropTypes } from 'react-native';
import StaticContainer from 'react-static-container';

Expand Down

0 comments on commit c126b84

Please sign in to comment.