@@ -62,7 +62,9 @@ function RNMultiStep(props: any): any {
62
62
style = { props . buttonStyle ? props . buttonStyle : styles . styleBtn }
63
63
onPress = { onPrevious }
64
64
>
65
- < Text style = { props . buttonLabelStyle ? props . buttonLabelStyle : styles . styleBtnLabel } > Previous</ Text >
65
+ < Text style = { props . buttonLabelStyle ? props . buttonLabelStyle : styles . styleBtnLabel } >
66
+ { props . config . previousButtonLabel ? props . config . previousButtonLabel : 'Previous' }
67
+ </ Text >
66
68
</ TouchableOpacity >
67
69
}
68
70
@@ -71,7 +73,9 @@ function RNMultiStep(props: any): any {
71
73
style = { props . buttonStyle ? props . buttonStyle : styles . styleBtn }
72
74
onPress = { onNext }
73
75
>
74
- < Text style = { props . buttonLabelStyle ? props . buttonLabelStyle : styles . styleBtnLabel } > Next</ Text >
76
+ < Text style = { props . buttonLabelStyle ? props . buttonLabelStyle : styles . styleBtnLabel } >
77
+ { props . config . nextButtonLabel ? props . config . nextButtonLabel : 'Next' }
78
+ </ Text >
75
79
</ TouchableOpacity >
76
80
}
77
81
{ ! canMove . canMoveNext &&
@@ -80,7 +84,9 @@ function RNMultiStep(props: any): any {
80
84
style = { props . buttonStyle ? props . buttonStyle : styles . styleBtn }
81
85
onPress = { onSubmit }
82
86
>
83
- < Text style = { props . buttonLabelStyle ? props . buttonLabelStyle : styles . styleBtnLabel } > Submit</ Text >
87
+ < Text style = { props . buttonLabelStyle ? props . buttonLabelStyle : styles . styleBtnLabel } >
88
+ { props . config . submitButtonLabel ? props . config . submitButtonLabel : 'Submit' }
89
+ </ Text >
84
90
</ TouchableOpacity >
85
91
}
86
92
</ View >
@@ -129,6 +135,11 @@ RNMultiStep.propTypes = {
129
135
buttonLabelStyle : PropTypes . object ,
130
136
onMoveNext : PropTypes . func ,
131
137
onMovePrevious : PropTypes . func ,
132
- onSubmit : PropTypes . func
138
+ onSubmit : PropTypes . func ,
139
+ config : PropTypes . shape ( {
140
+ nextButtonLabel : PropTypes . string ,
141
+ previousButtonLabel : PropTypes . string ,
142
+ submitButtonLabel : PropTypes . string
143
+ } )
133
144
} ;
134
145
export default RNMultiStep ;
0 commit comments