Merge pull request #256 from aboveyunhai/master

Fix proptypes warning while using Animated.Value on Size prop
This commit is contained in:
Markus Lindqvist 2020-08-27 13:10:04 +03:00 committed by GitHub
commit 3f88f9b94e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { View } from 'react-native';
import { Animated, View } from 'react-native';
import { Svg, Path, G } from 'react-native-svg';
export default class CircularProgress extends React.PureComponent {
@ -133,7 +133,10 @@ export default class CircularProgress extends React.PureComponent {
CircularProgress.propTypes = {
style: PropTypes.object,
size: PropTypes.number.isRequired,
size: PropTypes.oneOfType([
PropTypes.number,
PropTypes.instanceOf(Animated.Value),
]).isRequired,
fill: PropTypes.number.isRequired,
width: PropTypes.number.isRequired,
backgroundWidth: PropTypes.number,