@@ -62,12 +62,6 @@ import SegmentedControl from './SegmentedControl';
62
62
63
63
export default function App() {
64
64
const [tabIndex, setTabIndex] = React .useState (0 );
65
- const [tabIndex1, setTabIndex1] = React .useState (0 );
66
- const [tabIndex2, setTabIndex2] = React .useState (0 );
67
- const [tabIndex3, setTabIndex3] = React .useState (0 );
68
- const [tabIndex4, setTabIndex4] = React .useState (0 );
69
- const [tabIndex5, setTabIndex5] = React .useState (0 );
70
- const [tabIndex6, setTabIndex6] = React .useState (0 );
71
65
72
66
return (
73
67
<View style = { styles .container } >
@@ -79,66 +73,6 @@ export default function App() {
79
73
currentIndex = { tabIndex }
80
74
/>
81
75
</View >
82
- <View style = { styles .box } >
83
- <SegmentedControl
84
- containerMargin = { 16 }
85
- segments = { [' Label 1' , ' Label 2' , ' Label 3' ]}
86
- onChange = { (index ) => setTabIndex1 (index )}
87
- currentIndex = { tabIndex1 }
88
- />
89
- </View >
90
- <View style = { styles .box } >
91
- <SegmentedControl
92
- containerMargin = { 16 }
93
- segments = { [' Label 1' , ' Label 2' , ' Label 3' , ' Label 4' ]}
94
- onChange = { (index ) => setTabIndex2 (index )}
95
- currentIndex = { tabIndex2 }
96
- />
97
- </View >
98
- <View style = { styles .box } >
99
- <SegmentedControl
100
- containerMargin = { 16 }
101
- segments = { [' Label 1' , ' Label 2' , ' Label 3' ]}
102
- onChange = { (index ) => setTabIndex3 (index )}
103
- currentIndex = { tabIndex3 }
104
- segmentedControlWrapper = { { backgroundColor: ' #4a5568' }}
105
- activeTextStyle = { styles .customBlackColor }
106
- inactiveTextStyle = { styles .customWhiteColor }
107
- />
108
- </View >
109
- <View style = { styles .box } >
110
- <SegmentedControl
111
- containerMargin = { 16 }
112
- segments = { [' Label 1' , ' Label 2' , ' Label 3' , ' Label 4' ]}
113
- onChange = { (index ) => setTabIndex4 (index )}
114
- currentIndex = { tabIndex4 }
115
- segmentedControlWrapper = { { backgroundColor: ' #a3e635' }}
116
- activeTextStyle = { styles .customGreenColor }
117
- inactiveTextStyle = { styles .customWhiteColor }
118
- />
119
- </View >
120
- <View style = { styles .box } >
121
- <SegmentedControl
122
- containerMargin = { 16 }
123
- segments = { [' Label 1' , ' Label 2' , ' Label 3' ]}
124
- onChange = { (index ) => setTabIndex5 (index )}
125
- currentIndex = { tabIndex5 }
126
- segmentedControlWrapper = { { backgroundColor: ' #7dd3fc' }}
127
- activeTextStyle = { styles .customBlueTextColor }
128
- inactiveTextStyle = { styles .customWhiteColor }
129
- tileStyle = { styles .customBlueColor }
130
- badgeCount = { [2 ]}
131
- />
132
- </View >
133
- <View style = { styles .box } >
134
- <SegmentedControl
135
- containerMargin = { 16 }
136
- segments = { [' Label 1' , ' Label 2' , ' Label 3' ]}
137
- onChange = { (index ) => setTabIndex6 (index )}
138
- currentIndex = { tabIndex6 }
139
- badgeCount = { [2 , null , 1 ]}
140
- />
141
- </View >
142
76
</View >
143
77
);
144
78
}
0 commit comments