({value, onChange, label}: OptionSwitchProps)
| 8 | } |
| 9 | |
| 10 | const OptionSwitch = ({value, onChange, label}: OptionSwitchProps) => { |
| 11 | return ( |
| 12 | <View style={styles.switchContainer}> |
| 13 | <Switch |
| 14 | value={value} |
| 15 | onValueChange={onChange} |
| 16 | accessibilityLabel={label} |
| 17 | /> |
| 18 | <Text style={styles.switchLabel}>{label}</Text> |
| 19 | </View> |
| 20 | ); |
| 21 | }; |
| 22 | |
| 23 | const styles = StyleSheet.create({ |
| 24 | switchContainer: { |
nothing calls this directly
no outgoing calls
no test coverage detected