File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ class ExampleMain extends Component {
39
39
< View style = { styles . container } >
40
40
< Text style = { styles . headerText } > Default segmented control with single selection</ Text >
41
41
< SegmentedControlTab
42
+ values = { [ "one" , "two" ] }
42
43
selectedIndex = { this . state . selectedIndex }
43
44
tabStyle = { styles . tabStyle }
44
45
activeTabStyle = { styles . activeTabStyle }
@@ -111,7 +112,7 @@ const styles = StyleSheet.create({
111
112
marginVertical : 24
112
113
} ,
113
114
tabStyle : {
114
- borderColor : '#D52C43 '
115
+ borderColor : '#000000 '
115
116
} ,
116
117
activeTabStyle : {
117
118
backgroundColor : '#D52C43'
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ const SegmentedControlTab = ({
78
78
accessibilityLabels,
79
79
} ) => {
80
80
81
- const firstTabStyle = [ { borderRightWidth : values . length == 2 ? 1 : 0 , borderTopLeftRadius : borderRadius , borderBottomLeftRadius : borderRadius } ]
81
+ const firstTabStyle = [ { borderRightWidth : 0 , borderTopLeftRadius : borderRadius , borderBottomLeftRadius : borderRadius } ]
82
82
const lastTabStyle = [ { borderLeftWidth : 0 , borderTopRightRadius : borderRadius , borderBottomRightRadius : borderRadius } ]
83
83
84
84
return (
@@ -97,9 +97,9 @@ const SegmentedControlTab = ({
97
97
text = { item }
98
98
textNumberOfLines = { textNumberOfLines }
99
99
onTabPress = { ( index ) => handleTabPress ( index , selectedIndex , onTabPress ) }
100
- firstTabStyle = { index === 0 ? [ { borderRightWidth : 0 } , firstTabStyle ] : { } }
101
- lastTabStyle = { index === values . length - 1 ? [ { borderLeftWidth : 0 } , lastTabStyle ] : { } }
102
- tabStyle = { [ tabStyle , index !== 0 && index !== values . length - 1 ? { marginLeft : - 1 } : { } ] }
100
+ firstTabStyle = { index === 0 ? [ firstTabStyle ] : { } }
101
+ lastTabStyle = { index === values . length - 1 ? [ lastTabStyle ] : { } }
102
+ tabStyle = { [ tabStyle ] }
103
103
activeTabStyle = { activeTabStyle }
104
104
tabTextStyle = { tabTextStyle }
105
105
activeTabTextStyle = { activeTabTextStyle }
You can’t perform that action at this time.
0 commit comments