11import React from 'react' ;
2- import { View , StyleSheet , TouchableOpacity } from 'react-native' ;
2+ import { View , StyleSheet , TouchableOpacity , ViewStyle } from 'react-native' ;
33import { ViewProps } from 'react-native' ;
44import Icon from '../Icon' ;
55import Text from '../Typography/Text' ;
@@ -19,6 +19,7 @@ export interface StepsProps extends ViewProps {
1919 items : StepsItemsProps [ ] ;
2020 current ?: number ;
2121 onChange ?: ( value : number ) => void ;
22+ lineStyle ?: ViewStyle ;
2223}
2324
2425export default ( props : StepsProps ) => {
@@ -41,17 +42,17 @@ export default (props: StepsProps) => {
4142 return (
4243 < TouchableOpacity style = { [ styles . item ] } key = { index } onPress = { ( ) => onStepsPress ( index ) } >
4344 < View style = { styles . wrap } >
44- { index !== 0 && < View style = { styles . leftLine } > </ View > }
45+ { index !== 0 && < View style = { [ styles . leftLine , { ... props . lineStyle } ] } > </ View > }
4546 { item . render }
46- { index < items . length - 1 && < View style = { styles . rightLine } > </ View > }
47+ { index < items . length - 1 && < View style = { [ styles . rightLine , { ... props . lineStyle } ] } > </ View > }
4748 </ View >
4849 </ TouchableOpacity >
4950 ) ;
5051 }
5152 return (
5253 < TouchableOpacity style = { [ styles . item ] } key = { index } onPress = { ( ) => onStepsPress ( index ) } >
5354 < View style = { styles . wrap } >
54- { index !== 0 && < View style = { styles . leftLine } > </ View > }
55+ { index !== 0 && < View style = { [ styles . leftLine , { ... props . lineStyle } ] } > </ View > }
5556 < View
5657 style = { [
5758 styles . circular ,
@@ -77,7 +78,7 @@ export default (props: StepsProps) => {
7778 </ Text >
7879 ) }
7980 </ View >
80- { index < items . length - 1 && < View style = { styles . rightLine } > </ View > }
81+ { index < items . length - 1 && < View style = { [ styles . rightLine , { ... props . lineStyle } ] } > </ View > }
8182 </ View >
8283 < Text color = "primary_text" > { item . title } </ Text >
8384 < Text color = "text" style = { styles . desc } >
0 commit comments