({
onPress,
value,
onValueChange,
event,
}: {
onPress?: (e: GestureResponderEvent) => void;
value: string;
onValueChange?: (value: string) => void;
event: GestureResponderEvent;
})
| 1 | import type { GestureResponderEvent } from 'react-native'; |
| 2 | |
| 3 | export const handlePress = ({ |
| 4 | onPress, |
| 5 | value, |
| 6 | onValueChange, |
| 7 | event, |
| 8 | }: { |
| 9 | onPress?: (e: GestureResponderEvent) => void; |
| 10 | value: string; |
| 11 | onValueChange?: (value: string) => void; |
| 12 | event: GestureResponderEvent; |
| 13 | }) => { |
| 14 | if (onPress && onValueChange) { |
| 15 | console.warn( |
| 16 | `onPress in the scope of RadioButtonGroup will not be executed, use onValueChange instead` |
| 17 | ); |
| 18 | } |
| 19 | |
| 20 | onValueChange ? onValueChange(value) : onPress?.(event); |
| 21 | }; |
| 22 | |
| 23 | export const isChecked = ({ |
| 24 | value, |
no test coverage detected
searching dependent graphs…