From 8ad84bb42c44d2b2406f8e24b580be256cc43a6f Mon Sep 17 00:00:00 2001 From: aboveyunhai <35160613+aboveyunhai@users.noreply.github.com> Date: Thu, 20 Aug 2020 16:07:19 -0400 Subject: [PATCH 1/2] Fix the proptype warning on Animated.Value --- src/CircularProgress.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/CircularProgress.js b/src/CircularProgress.js index 87294d6..38a8e16 100644 --- a/src/CircularProgress.js +++ b/src/CircularProgress.js @@ -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), + ]), fill: PropTypes.number.isRequired, width: PropTypes.number.isRequired, backgroundWidth: PropTypes.number, From 7fb589d302c3abe4db9d1b9941ba77d2b8e148b8 Mon Sep 17 00:00:00 2001 From: aboveyunhai <35160613+aboveyunhai@users.noreply.github.com> Date: Thu, 20 Aug 2020 16:13:27 -0400 Subject: [PATCH 2/2] chain isRequired --- src/CircularProgress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CircularProgress.js b/src/CircularProgress.js index 38a8e16..3de2d77 100644 --- a/src/CircularProgress.js +++ b/src/CircularProgress.js @@ -136,7 +136,7 @@ CircularProgress.propTypes = { size: PropTypes.oneOfType([ PropTypes.number, PropTypes.instanceOf(Animated.Value), - ]), + ]).isRequired, fill: PropTypes.number.isRequired, width: PropTypes.number.isRequired, backgroundWidth: PropTypes.number,