| 48 | }; |
| 49 | |
| 50 | export interface SegmentedControlProps extends ViewProps { |
| 51 | /** |
| 52 | * If false the user won't be able to interact with the control. Default value is true. |
| 53 | */ |
| 54 | enabled?: boolean; |
| 55 | |
| 56 | /** |
| 57 | * If true, then selecting a segment won't persist visually. |
| 58 | * The onValueChange callback will still work as expected. |
| 59 | */ |
| 60 | momentary?: boolean; |
| 61 | |
| 62 | /** |
| 63 | * Callback that is called when the user taps a segment; |
| 64 | * passes the event as an argument |
| 65 | */ |
| 66 | onChange?: ( |
| 67 | event: NativeSyntheticEvent<NativeSegmentedControlIOSChangeEvent>, |
| 68 | ) => void; |
| 69 | |
| 70 | /** |
| 71 | * Callback that is called when the user taps a segment; passes the segment's value as an argument |
| 72 | */ |
| 73 | onValueChange?: (value: string) => void; |
| 74 | |
| 75 | /** |
| 76 | * The index in props.values of the segment to be (pre)selected. |
| 77 | */ |
| 78 | selectedIndex?: number; |
| 79 | |
| 80 | /** |
| 81 | * Accent color of the control. |
| 82 | */ |
| 83 | tintColor?: string; |
| 84 | |
| 85 | /** |
| 86 | * (iOS 13+ only) |
| 87 | * Background color of the control. |
| 88 | */ |
| 89 | backgroundColor?: string; |
| 90 | |
| 91 | /** |
| 92 | * The labels for the control's segment buttons, in order. |
| 93 | */ |
| 94 | values?: string[]; |
| 95 | |
| 96 | /** |
| 97 | * (iOS 13+ only) |
| 98 | * Overrides the control's appearance irrespective of the OS theme |
| 99 | */ |
| 100 | appearance?: 'dark' | 'light'; |
| 101 | /** |
| 102 | * Font style properties of the Segmented Control |
| 103 | */ |
| 104 | fontStyle?: FontStyle; |
| 105 | /** |
| 106 | * Active Font style properties of the Segmented Control |
| 107 | */ |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…