Skip to content

Commit 59da609

Browse files
authored
Merge pull request #3 from anand-netzoptimize/master
Implemented individual button style props
2 parents 224e37e + 06f2547 commit 59da609

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

src/index.tsx

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function RNMultiStep(props: any): any {
9898
>
9999
{canMove.canMovePrevious && (
100100
<TouchableOpacity
101-
style={props.buttonStyle ? props.buttonStyle : styles.styleBtn}
101+
style={props.prevButtonStyle ? props.prevButtonStyle : styles.prevStyleBtn}
102102
onPress={onPrevious}
103103
>
104104
<Text
@@ -117,7 +117,7 @@ function RNMultiStep(props: any): any {
117117

118118
{canMove.canMoveNext && (
119119
<TouchableOpacity
120-
style={props.buttonStyle ? props.buttonStyle : styles.styleBtn}
120+
style={props.nextButtonStyle ? props.nextButtonStyle : styles.styleBtn}
121121
onPress={onNext}
122122
>
123123
<Text
@@ -135,7 +135,7 @@ function RNMultiStep(props: any): any {
135135
)}
136136
{!canMove.canMoveNext && typeof props.onSubmit === 'function' && (
137137
<TouchableOpacity
138-
style={props.buttonStyle ? props.buttonStyle : styles.styleBtn}
138+
style={props.submitButtonStyle ? props.submitButtonStyle : styles.submitStyleBtn}
139139
onPress={onSubmit}
140140
>
141141
<Text
@@ -176,7 +176,25 @@ const styles = StyleSheet.create({
176176
paddingLeft: 10,
177177
paddingRight: 30,
178178
},
179-
styleBtn: {
179+
prevStyleBtn: {
180+
alignItems: 'center',
181+
backgroundColor: '#1e1ee3',
182+
borderRadius: 50,
183+
shadowColor: '#5252d1',
184+
margin: 10,
185+
padding: 20,
186+
width: '40%',
187+
},
188+
submitStyleBtn: {
189+
alignItems: 'center',
190+
backgroundColor: 'grey',
191+
borderRadius: 50,
192+
shadowColor: '#5252d1',
193+
margin: 10,
194+
padding: 20,
195+
width: '40%',
196+
},
197+
nextStyleBtn: {
180198
alignItems: 'center',
181199
backgroundColor: '#1e1ee3',
182200
borderRadius: 50,
@@ -194,7 +212,9 @@ RNMultiStep.propTypes = {
194212
children: PropTypes.any,
195213
containerStyle: PropTypes.object,
196214
containerButtonStyle: PropTypes.object,
197-
buttonStyle: PropTypes.object,
215+
prevButtonStyle: PropTypes.object,
216+
nextButtonStyle: PropTypes.object,
217+
submitButtonStyle: PropTypes.object,
198218
buttonLabelStyle: PropTypes.object,
199219
onMoveNext: PropTypes.func,
200220
onMovePrevious: PropTypes.func,

0 commit comments

Comments
 (0)