24ark / react-native-step-indicator

A simple react-native implementation of step indicator widget compatible with the ViewPager and ListView.
Apache License 2.0
1.43k stars 312 forks source link

Allow custom finished color per step #67

Open dominictwlee opened 5 years ago

dominictwlee commented 5 years ago

I currently have a use case where I'd like the finished color per step to be dependent on some state of completion of the form that they have filled in.

For example, on each page of the form the user can check off "Opt out", and if they move on to the next page without fully completing the form, I'd like to render a different fill color for that step depending on the "completeness" of that step.

I currently just feed in an array of state that correspond to the position, and that conditionally renders the finished color for each step as complete("green"), or incomplete("red").

How would you approach this with the current API? Would this be a common use case for others that could warrant a pull request? I'm happy to contribute if so, but would like your input before I proceed.

Awesome component by the way, thanks!