react-native-paper
Version:
Material design for React Native
23 lines • 603 B
JavaScript
export const handlePress = ({
onPress,
value,
onValueChange,
event
}) => {
if (onPress && onValueChange) {
console.warn(`onPress in the scope of RadioButtonGroup will not be executed, use onValueChange instead`);
}
onValueChange ? onValueChange(value) : onPress === null || onPress === void 0 ? void 0 : onPress(event);
};
export const isChecked = ({
value,
status,
contextValue
}) => {
if (contextValue !== undefined && contextValue !== null) {
return contextValue === value ? 'checked' : 'unchecked';
} else {
return status;
}
};
//# sourceMappingURL=utils.js.map