@@ -77,59 +77,115 @@ return (
77
77
}}
78
78
/ >
79
79
);
80
-
81
- type SegmentedControlIOSProps = $ReadOnly< {|
82
- ... ViewProps,
83
- /**
84
- * The labels for the control's segment buttons, in order.
85
- */
86
- values?: $ReadOnlyArray< string> ,
87
- /**
88
- * The index in `props.values` of the segment to be (pre)selected.
89
- */
90
- selectedIndex?: ? number,
91
- /**
92
- * Callback that is called when the user taps a segment;
93
- * passes the segment's value as an argument
94
- */
95
- onValueChange?: ? (value : number ) => mixed,
96
- /**
97
- * Callback that is called when the user taps a segment;
98
- * passes the event as an argument
99
- */
100
- onChange?: ? (event : Event ) => mixed,
101
- /**
102
- * If false the user won't be able to interact with the control.
103
- * Default value is true.
104
- */
105
- enabled?: boolean,
106
- /**
107
- * Accent color of the control.
108
- */
109
- tintColor?: ? string,
110
- /**
111
- * (For iOS >= 13)
112
- * Text color of the control.
113
- */
114
- textColor?: ? string,
115
- /**
116
- * Text color of the control when selected.
117
- * NOTE: this prop will only work for iOS >= 13
118
- */
119
- activeTextColor?: ? string,
120
- /**
121
- * (For iOS >= 13)
122
- * Background color of the control.
123
- */
124
- backgroundColor?: ? string,
125
- /**
126
- * If true, then selecting a segment won't persist visually.
127
- * The `onValueChange` callback will still work as expected.
128
- */
129
- momentary?: ? boolean,
130
- | }> ;
131
80
```
132
81
82
+ ---
83
+
84
+ # Reference
85
+
86
+ ## Props
87
+
88
+ Inherits [ View Props] ( view.md#props ) .
89
+
90
+ ### ` enabled `
91
+
92
+ If false the user won't be able to interact with the control. Default value is true.
93
+
94
+ | Type | Required |
95
+ | ---- | -------- |
96
+ | bool | No |
97
+
98
+ ---
99
+
100
+ ### ` momentary `
101
+
102
+ If true, then selecting a segment won't persist visually. The ` onValueChange ` callback will still work as expected.
103
+
104
+ | Type | Required |
105
+ | ---- | -------- |
106
+ | bool | No |
107
+
108
+ ---
109
+
110
+ ### ` onChange `
111
+
112
+ Callback that is called when the user taps a segment; passes the event as an argument
113
+
114
+ | Type | Required |
115
+ | -------- | -------- |
116
+ | function | No |
117
+
118
+ ---
119
+
120
+ ### ` onValueChange `
121
+
122
+ Callback that is called when the user taps a segment; passes the segment's value as an argument
123
+
124
+ | Type | Required |
125
+ | -------- | -------- |
126
+ | function | No |
127
+
128
+ ---
129
+
130
+ ### ` selectedIndex `
131
+
132
+ The index in ` props.values ` of the segment to be (pre)selected.
133
+
134
+ | Type | Required |
135
+ | ------ | -------- |
136
+ | number | No |
137
+
138
+ ---
139
+
140
+ ### ` tintColor `
141
+
142
+ Accent color of the control.
143
+
144
+ | Type | Required |
145
+ | ------ | -------- |
146
+ | string | No |
147
+
148
+ ---
149
+
150
+ ### ` textColor `
151
+
152
+ Text color of the control. (iOS 13+ only)
153
+
154
+ | Type | Required | Supported Version |
155
+ | ------ | -------- | ----- |
156
+ | string | No | iOS 13+ |
157
+
158
+ ---
159
+
160
+ ### ` activeTextColor `
161
+
162
+ Text color of the active control. (iOS 13+ only)
163
+
164
+ | Type | Required | Supported Version |
165
+ | ------ | -------- | ----- |
166
+ | string | No | iOS 13+ |
167
+
168
+ ---
169
+
170
+ ### ` backgroundColor `
171
+
172
+ Background color color of the control. (iOS 13+ only)
173
+
174
+ | Type | Required | Supported Version |
175
+ | ------ | -------- | ----- |
176
+ | string | No | iOS 13+ |
177
+
178
+ ---
179
+
180
+ ### ` values `
181
+
182
+ The labels for the control's segment buttons, in order.
183
+
184
+ | Type | Required |
185
+ | --------------- | -------- |
186
+ | array of string | No |
187
+
188
+
133
189
## Maintainers
134
190
135
191
- [ M.Haris Baig] ( https://github.com/harisbaig100 )
0 commit comments