import React from 'react' import { Text, TouchableOpacity, View } from 'react-native' import { IRadioGroupProps } from './types' const RadioGroup = ({ options, selectedValue, onValueChange, label, error, styles, }: IRadioGroupProps) => { return ( {label && ( {label} )} {options.map((option) => { const isSelected = selectedValue === option.value return ( { onValueChange(option.value) }} > {isSelected && ( )} {option.label} ) })} {error && ( {error} )} ) } export default RadioGroup