import {ListRenderItemInfo, View} from 'react-native'; import {List, RadioButton} from 'react-native-paper'; import {useColor} from './color'; import CountMany from './count-many'; interface Props extends ListRenderItemInfo { onSelect: (index: number) => void; selected: number; } export default function StartPlanItem(props: Props) { const {index, item, onSelect, selected} = props; const {color} = useColor(); return ( onSelect(index)} left={() => ( onSelect(index)} value={index.toString()} status={selected === index ? 'checked' : 'unchecked'} color={color} /> )} /> ); }