11const React = require ( 'react' ) ;
2- const { ViewPropTypes } = ReactNative = require ( 'react-native' ) ;
2+ const ReactNative = require ( 'react-native' ) ;
33const {
44 View,
55 Animated,
@@ -8,28 +8,31 @@ const {
88 Text,
99 Platform,
1010 Dimensions,
11- I18nManager
11+ I18nManager,
12+ ViewPropTypes
1213} = ReactNative ;
1314const Button = require ( './Button' ) ;
15+ const PropTypes = require ( 'prop-types' ) ;
16+ const createClass = require ( 'create-react-class' ) ;
1417
1518const WINDOW_WIDTH = Dimensions . get ( 'window' ) . width ;
1619
17- const ScrollableTabBar = React . createClass ( {
20+ const ScrollableTabBar = createClass ( {
1821 propTypes : {
19- goToPage : React . PropTypes . func ,
20- activeTab : React . PropTypes . number ,
21- tabs : React . PropTypes . array ,
22- backgroundColor : React . PropTypes . string ,
23- activeTextColor : React . PropTypes . string ,
24- inactiveTextColor : React . PropTypes . string ,
25- scrollOffset : React . PropTypes . number ,
22+ goToPage : PropTypes . func ,
23+ activeTab : PropTypes . number ,
24+ tabs : PropTypes . array ,
25+ backgroundColor : PropTypes . string ,
26+ activeTextColor : PropTypes . string ,
27+ inactiveTextColor : PropTypes . string ,
28+ scrollOffset : PropTypes . number ,
2629 style : ViewPropTypes . style ,
2730 tabStyle : ViewPropTypes . style ,
2831 tabsContainerStyle : ViewPropTypes . style ,
29- textStyle : Text . propTypes . style ,
30- renderTab : React . PropTypes . func ,
32+ textStyle : ViewPropTypes . style ,
33+ renderTab : PropTypes . func ,
3134 underlineStyle : ViewPropTypes . style ,
32- onScroll :React . PropTypes . func ,
35+ onScroll : PropTypes . func ,
3336 } ,
3437
3538 getDefaultProps ( ) {
@@ -240,4 +243,4 @@ const styles = StyleSheet.create({
240243 flexDirection : 'row' ,
241244 justifyContent : 'space-around' ,
242245 } ,
243- } ) ;
246+ } ) ;
0 commit comments