react-native-circular-progress icon indicating copy to clipboard operation
react-native-circular-progress copied to clipboard

tintColorSecondary does not exist on type

Open pisacode opened this issue 5 years ago • 4 comments

tintColorSecondary is not implemented

pisacode avatar Sep 17 '19 15:09 pisacode

same issue

lashansam avatar Sep 17 '19 16:09 lashansam

It seems somehow it was remove from the file. Here is the commit with the tintColorSecondary prop in place Link. Just add this function to AnimatedCircularProgress.js file

animateColor() {
    if (!this.props.tintColorSecondary) {
      return this.props.tintColor
    }

    const tintAnimation = this.state.fillAnimation.interpolate({
      inputRange: [0, 100],
      outputRange: [this.props.tintColor, this.props.tintColorSecondary]
    })

    return tintAnimation
 }

and then add animateColor function to prop as the following <AnimatedProgress {...other} fill={this.state.fillAnimation} tintColor={this.animateColor()}/>

pisacode avatar Sep 18 '19 07:09 pisacode

@pisacode would you be able to submit a pull request to fix the issue you are experiencing?

markusl avatar Sep 20 '19 05:09 markusl