react-circular-progressbar icon indicating copy to clipboard operation
react-circular-progressbar copied to clipboard

Add action on click

Open SyedSaal opened this issue 6 years ago • 7 comments

🚀 Feature request

Add action on click

Hey, I'm developing timer progress bar and I want to give an action after the completion of set timer or when User clicks on it.

I tried adding onClick and it's not invoking the method. It would be better if you make an feature to enable interaction or disable it.

SyedSaal avatar Jun 27 '19 11:06 SyedSaal

Yeah, this makes sense to me. I can take a look at some point, but PRs are welcome.

kevinsqi avatar Jul 08 '19 18:07 kevinsqi

I would like to add on to this feature request. In the scenario where we have multiple paths in a single circular progress bar, it would be great to add an action to each of those paths.

navarro-david avatar Jul 30 '19 17:07 navarro-david

I added an action.. below is my code

const timerView = !isAlreadyVisitedItem && ( <div onClick={() => this.nextItemClick(true)}> <CircularProgress> <ChangingProgressProvider value={progressCurrentValue}> {percentage => ( <CircularProgressbar value={percentage} minValue={0} maxValue={30} styles={buildStyles({ pathTransitionDuration: 1, pathColor: "white",//turquoise //trailColor: "gold", })} /> )} </ChangingProgressProvider> </CircularProgress> </div> );

SyedSaal avatar Jul 31 '19 09:07 SyedSaal

+1 for adding on click

wazcov avatar Oct 12 '19 11:10 wazcov

+1 for adding on click

hamed-farag avatar May 11 '20 11:05 hamed-farag

+1

taejs avatar Sep 06 '21 15:09 taejs