Using ViewPropTypes.style to fix a production crash issue.

This commit is contained in:
Jay Stramel 2017-10-23 20:23:11 -06:00
parent 91f15f5a53
commit 85eb3c4d78
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { View, Animated } from 'react-native';
import { View, ViewPropTypes, Animated } from 'react-native';
import CircularProgress from './CircularProgress';
const AnimatedProgress = Animated.createAnimatedComponent(CircularProgress);
@ -56,7 +56,7 @@ export default class AnimatedCircularProgress extends React.Component {
}
AnimatedCircularProgress.propTypes = {
style: View.propTypes.style,
style: ViewPropTypes.style,
size: PropTypes.number.isRequired,
fill: PropTypes.number,
prefill: PropTypes.number,

View File

@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { View, Platform } from 'react-native';
import { View, ViewPropTypes, Platform } from 'react-native';
import { Surface, Shape, Path, Group } from '../../react-native/Libraries/ART/ReactNativeART';
import MetricsPath from 'art/metrics/path';
@ -28,7 +28,7 @@ export default class CircularProgress extends React.Component {
const { size, width, tintColor, backgroundColor, style, rotation, linecap, children } = this.props;
const backgroundPath = this.circlePath(size / 2, size / 2, size / 2 - width / 2, 0, 360 * .9999);
const fill = this.extractFill(this.props.fill);
const fill = this.extractFill(this.props.fill);
const circlePath = this.circlePath(size / 2, size / 2, size / 2 - width / 2, 0, (360 * .9999) * fill / 100);
return (
@ -55,7 +55,7 @@ export default class CircularProgress extends React.Component {
}
CircularProgress.propTypes = {
style: View.propTypes.style,
style: ViewPropTypes.style,
size: PropTypes.number.isRequired,
fill: PropTypes.number.isRequired,
width: PropTypes.number.isRequired,