@@ -7,46 +7,60 @@ import {
77 NativeSyntheticEvent ,
88 NativeSegmentedControlIOSChangeEvent ,
99 NativeMethodsMixin ,
10- Constructor
11- } from 'react-native'
10+ Constructor ,
11+ } from 'react-native' ;
1212
1313export interface SegmentedControlIOSProps extends ViewProps {
14- /**
15- * If false the user won't be able to interact with the control. Default value is true.
16- */
17- enabled ?: boolean ;
14+ /**
15+ * If false the user won't be able to interact with the control. Default value is true.
16+ */
17+ enabled ?: boolean ;
1818
19- /**
20- * If true, then selecting a segment won't persist visually.
21- * The onValueChange callback will still work as expected.
22- */
23- momentary ?: boolean ;
19+ /**
20+ * If true, then selecting a segment won't persist visually.
21+ * The onValueChange callback will still work as expected.
22+ */
23+ momentary ?: boolean ;
2424
25- /**
26- * Callback that is called when the user taps a segment;
27- * passes the event as an argument
28- */
29- onChange ?: ( event : NativeSyntheticEvent < NativeSegmentedControlIOSChangeEvent > ) => void ;
25+ /**
26+ * Callback that is called when the user taps a segment;
27+ * passes the event as an argument
28+ */
29+ onChange ?: (
30+ event : NativeSyntheticEvent < NativeSegmentedControlIOSChangeEvent > ,
31+ ) => void ;
3032
31- /**
32- * Callback that is called when the user taps a segment; passes the segment's value as an argument
33- */
34- onValueChange ?: ( value : string ) => void ;
33+ /**
34+ * Callback that is called when the user taps a segment; passes the segment's value as an argument
35+ */
36+ onValueChange ?: ( value : string ) => void ;
3537
36- /**
37- * The index in props.values of the segment to be (pre)selected.
38- */
39- selectedIndex ?: number ;
38+ /**
39+ * The index in props.values of the segment to be (pre)selected.
40+ */
41+ selectedIndex ?: number ;
4042
41- /**
42- * Accent color of the control.
43- */
44- tintColor ?: string ;
43+ /**
44+ * Accent color of the control.
45+ */
46+ tintColor ?: string ;
4547
46- /**
47- * The labels for the control's segment buttons, in order.
48- */
49- values ?: string [ ] ;
48+ /**
49+ * (iOS 13 only)
50+ * Text color of the control.
51+ */
52+ textColor ?: string ;
53+
54+ /**
55+ * (iOS 13 only)
56+ * Background color of the control.
57+ */
58+ backgroundColor ?: string ;
59+
60+ /**
61+ * The labels for the control's segment buttons, in order.
62+ */
63+ values ?: string [ ] ;
5064}
5165
5266/**
@@ -69,6 +83,9 @@ export interface SegmentedControlIOSProps extends ViewProps {
6983 * />
7084 * ````
7185 */
72- declare class SegmentedControlIOSComponent extends React . Component < SegmentedControlIOSProps > { }
73- declare const SegmentedControlIOSBase : Constructor < NativeMethodsMixin > & typeof SegmentedControlIOSComponent ;
74- export default class SegmentedControlIOS extends SegmentedControlIOSBase { }
86+ declare class SegmentedControlIOSComponent extends React . Component <
87+ SegmentedControlIOSProps
88+ > { }
89+ declare const SegmentedControlIOSBase : Constructor < NativeMethodsMixin > &
90+ typeof SegmentedControlIOSComponent ;
91+ export default class SegmentedControlIOS extends SegmentedControlIOSBase { }
0 commit comments