Skip to content

Commit fc85f90

Browse files
Olli Jaakkolaskv-headless
authored andcommitted
Fix warning: View.propTypes has been deprecated ... Use ViewPropTypes instead
1 parent 9275905 commit fc85f90

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

DefaultTabBar.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const React = require('react');
2-
const ReactNative = require('react-native');
2+
const { ViewPropTypes } = ReactNative = require('react-native');
33
const {
44
StyleSheet,
55
Text,
@@ -17,9 +17,9 @@ const DefaultTabBar = React.createClass({
1717
activeTextColor: React.PropTypes.string,
1818
inactiveTextColor: React.PropTypes.string,
1919
textStyle: Text.propTypes.style,
20-
tabStyle: View.propTypes.style,
20+
tabStyle: ViewPropTypes.style,
2121
renderTab: React.PropTypes.func,
22-
underlineStyle: View.propTypes.style,
22+
underlineStyle: ViewPropTypes.style,
2323
},
2424

2525
getDefaultProps() {

ScrollableTabBar.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const React = require('react');
2-
const ReactNative = require('react-native');
2+
const { ViewPropTypes } = ReactNative = require('react-native');
33
const {
44
View,
55
Animated,
@@ -22,12 +22,13 @@ const ScrollableTabBar = React.createClass({
2222
activeTextColor: React.PropTypes.string,
2323
inactiveTextColor: React.PropTypes.string,
2424
scrollOffset: React.PropTypes.number,
25-
style: View.propTypes.style,
26-
tabStyle: View.propTypes.style,
27-
tabsContainerStyle: View.propTypes.style,
25+
style: ViewPropTypes.style,
26+
tabStyle: ViewPropTypes.style,
27+
tabsContainerStyle: ViewPropTypes.style,
2828
textStyle: Text.propTypes.style,
2929
renderTab: React.PropTypes.func,
30-
underlineStyle: View.propTypes.style,
30+
underlineStyle: ViewPropTypes.style,
31+
onScroll:React.PropTypes.func,
3132
},
3233

3334
getDefaultProps() {

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const {
33
PropTypes,
44
Component,
55
} = React;
6-
const ReactNative = require('react-native');
6+
const { ViewPropTypes } = ReactNative = require('react-native');
77
const {
88
Dimensions,
99
View,
@@ -36,7 +36,7 @@ const ScrollableTabView = React.createClass({
3636
onChangeTab: PropTypes.func,
3737
onScroll: PropTypes.func,
3838
renderTabBar: PropTypes.any,
39-
style: View.propTypes.style,
39+
style: ViewPropTypes.style,
4040
contentProps: PropTypes.object,
4141
scrollWithoutAnimation: PropTypes.bool,
4242
locked: PropTypes.bool,

0 commit comments

Comments
 (0)