@@ -7,46 +7,60 @@ import {
7
7
NativeSyntheticEvent ,
8
8
NativeSegmentedControlIOSChangeEvent ,
9
9
NativeMethodsMixin ,
10
- Constructor
11
- } from 'react-native'
10
+ Constructor ,
11
+ } from 'react-native' ;
12
12
13
13
export 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 ;
18
18
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 ;
24
24
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 ;
30
32
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 ;
35
37
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 ;
40
42
41
- /**
42
- * Accent color of the control.
43
- */
44
- tintColor ?: string ;
43
+ /**
44
+ * Accent color of the control.
45
+ */
46
+ tintColor ?: string ;
45
47
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 [ ] ;
50
64
}
51
65
52
66
/**
@@ -69,6 +83,9 @@ export interface SegmentedControlIOSProps extends ViewProps {
69
83
* />
70
84
* ````
71
85
*/
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