react-native-step-indicator icon indicating copy to clipboard operation
react-native-step-indicator copied to clipboard

Hello, May I know how can I put icon to the steps instead of numbers, I tried to use renderStepIndicator but the function is red line

Open teowks000 opened this issue 5 years ago • 1 comments

teowks000 avatar Feb 03 '21 03:02 teowks000

Use renderStepIndicator method to define your custom design.

<StepIndicator customStyles={stepIndicatorCustomStyles} renderStepIndicator={({ position, stepStatus, }: { position: number; stepStatus: string; }) => { //console.log("stepStatus:", stepStatus) let imagePath = [ require("../../assets/signup.png"), require("../../assets/otp.png"), require("../../assets/profile.png"), require("../../assets/Intrest.png"), ]; let selectedImagePath = [ require("../../assets/signupS.png"), require("../../assets/otpS.png"), require("../../assets/profileS.png"), require("../../assets/IntrestS.png"), ]; return ( <Image style={{ resizeMode: "contain", width: 60, height: 60 }} source={ currentStep == position ? selectedImagePath[position] : imagePath[position] } ></Image> ); }} currentPosition={currentStep} stepCount={labels.length} labels={labels} />

naveed1239 avatar May 25 '21 06:05 naveed1239