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.44k stars 312 forks source link

renderLabel function #113

Open hanaechahid opened 3 years ago

hanaechahid commented 3 years ago

Hello, how can I use renderLabel function?

Haseeba393 commented 3 years ago

This is how you can use this function <StepIndicator customStyles={customStyles} currentPosition={0} labels={TRACK_LABELS} direction='vertical' renderLabel={({position, stepStatus, label, currentPosition})=>{ return( <Text style={{ fontFamily: FONT, fontSize: WP(TEXT_SIZES.info_1), color: position == currentPosition ? COLORS.primaryColor:COLORS.blackColor, textAlign: 'left', }}>{label} ); }} />