File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,11 +4,14 @@ import {
44 Animated ,
55 Easing ,
66 View ,
7+ ViewPropTypes ,
78} from 'react-native' ;
89
910const INDETERMINATE_WIDTH_FACTOR = 0.3 ;
1011const BAR_WIDTH_ZERO_POSITION = INDETERMINATE_WIDTH_FACTOR / ( 1 + INDETERMINATE_WIDTH_FACTOR ) ;
1112
13+ const RNViewPropTypes = ViewPropTypes || View . propTypes ;
14+
1215export default class ProgressBar extends Component {
1316 static propTypes = {
1417 animated : PropTypes . bool ,
@@ -21,7 +24,7 @@ export default class ProgressBar extends Component {
2124 indeterminate : PropTypes . bool ,
2225 onLayout : PropTypes . func ,
2326 progress : PropTypes . number ,
24- style : View . propTypes . style ,
27+ style : RNViewPropTypes . style ,
2528 unfilledColor : PropTypes . string ,
2629 width : PropTypes . number ,
2730 } ;
Original file line number Diff line number Diff line change 66 StyleSheet ,
77 Text ,
88 View ,
9+ ViewPropTypes ,
910} from 'react-native' ;
1011
1112import Arc from './Shapes/Arc' ;
@@ -16,6 +17,8 @@ const CIRCLE = Math.PI * 2;
1617const AnimatedSurface = Animated . createAnimatedComponent ( ART . Surface ) ;
1718const AnimatedArc = Animated . createAnimatedComponent ( Arc ) ;
1819
20+ const RNViewPropTypes = ViewPropTypes || View . propTypes ;
21+
1922const styles = StyleSheet . create ( {
2023 container : {
2124 backgroundColor : 'transparent' ,
@@ -40,7 +43,7 @@ export class ProgressCircle extends Component {
4043 rotation : PropTypes . instanceOf ( Animated . Value ) ,
4144 showsText : PropTypes . bool ,
4245 size : PropTypes . number ,
43- style : View . propTypes . style ,
46+ style : RNViewPropTypes . style ,
4447 textStyle : Text . propTypes . style ,
4548 thickness : PropTypes . number ,
4649 unfilledColor : PropTypes . string ,
Original file line number Diff line number Diff line change 55 ART ,
66 Easing ,
77 View ,
8+ ViewPropTypes ,
89} from 'react-native' ;
910
1011import Arc from './Shapes/Arc' ;
@@ -14,6 +15,8 @@ const AnimatedArc = Animated.createAnimatedComponent(Arc);
1415const MIN_ARC_ANGLE = 0.1 ;
1516const MAX_ARC_ANGLE = 1.5 * Math . PI ;
1617
18+ const RNViewPropTypes = ViewPropTypes || View . propTypes ;
19+
1720export default class CircleSnail extends Component {
1821 static propTypes = {
1922 animating : PropTypes . bool ,
@@ -27,7 +30,7 @@ export default class CircleSnail extends Component {
2730 hidesWhenStopped : PropTypes . bool ,
2831 size : PropTypes . number ,
2932 spinDuration : PropTypes . number ,
30- style : View . propTypes . style ,
33+ style : RNViewPropTypes . style ,
3134 thickness : PropTypes . number ,
3235 strokeCap : PropTypes . string
3336 } ;
Original file line number Diff line number Diff line change 55 ART ,
66 StyleSheet ,
77 View ,
8+ ViewPropTypes ,
89} from 'react-native' ;
910
1011import Circle from './Shapes/Circle' ;
@@ -16,6 +17,8 @@ const CIRCLE = Math.PI * 2;
1617const AnimatedSurface = Animated . createAnimatedComponent ( ART . Surface ) ;
1718const AnimatedSector = Animated . createAnimatedComponent ( Sector ) ;
1819
20+ const RNViewPropTypes = ViewPropTypes || View . propTypes ;
21+
1922const styles = StyleSheet . create ( {
2023 container : {
2124 backgroundColor : 'transparent' ,
@@ -36,7 +39,7 @@ export class ProgressPie extends Component {
3639 ] ) ,
3740 rotation : PropTypes . instanceOf ( Animated . Value ) ,
3841 size : PropTypes . number ,
39- style : View . propTypes . style ,
42+ style : RNViewPropTypes . style ,
4043 unfilledColor : PropTypes . string ,
4144 } ;
4245
You can’t perform that action at this time.
0 commit comments