1
1
import React from 'react' ;
2
- import { View , StyleSheet , TouchableOpacity } from 'react-native' ;
2
+ import { View , StyleSheet , TouchableOpacity , ViewStyle } from 'react-native' ;
3
3
import { ViewProps } from 'react-native' ;
4
4
import Icon from '../Icon' ;
5
5
import Text from '../Typography/Text' ;
@@ -19,6 +19,7 @@ export interface StepsProps extends ViewProps {
19
19
items : StepsItemsProps [ ] ;
20
20
current ?: number ;
21
21
onChange ?: ( value : number ) => void ;
22
+ lineStyle ?: ViewStyle ;
22
23
}
23
24
24
25
export default ( props : StepsProps ) => {
@@ -41,17 +42,17 @@ export default (props: StepsProps) => {
41
42
return (
42
43
< TouchableOpacity style = { [ styles . item ] } key = { index } onPress = { ( ) => onStepsPress ( index ) } >
43
44
< View style = { styles . wrap } >
44
- { index !== 0 && < View style = { styles . leftLine } > </ View > }
45
+ { index !== 0 && < View style = { [ styles . leftLine , { ... props . lineStyle } ] } > </ View > }
45
46
{ item . render }
46
- { index < items . length - 1 && < View style = { styles . rightLine } > </ View > }
47
+ { index < items . length - 1 && < View style = { [ styles . rightLine , { ... props . lineStyle } ] } > </ View > }
47
48
</ View >
48
49
</ TouchableOpacity >
49
50
) ;
50
51
}
51
52
return (
52
53
< TouchableOpacity style = { [ styles . item ] } key = { index } onPress = { ( ) => onStepsPress ( index ) } >
53
54
< View style = { styles . wrap } >
54
- { index !== 0 && < View style = { styles . leftLine } > </ View > }
55
+ { index !== 0 && < View style = { [ styles . leftLine , { ... props . lineStyle } ] } > </ View > }
55
56
< View
56
57
style = { [
57
58
styles . circular ,
@@ -77,7 +78,7 @@ export default (props: StepsProps) => {
77
78
</ Text >
78
79
) }
79
80
</ View >
80
- { index < items . length - 1 && < View style = { styles . rightLine } > </ View > }
81
+ { index < items . length - 1 && < View style = { [ styles . rightLine , { ... props . lineStyle } ] } > </ View > }
81
82
</ View >
82
83
< Text color = "primary_text" > { item . title } </ Text >
83
84
< Text color = "text" style = { styles . desc } >
0 commit comments