import { RadioOption } from '../RadioGroup/RadioGroup'; import { Row } from '../../general/Row/Row'; import { Flex } from '../../general/Flex/Flex'; import { Icon } from '../../general/Icon/Icon'; import { Text } from '../../general/Text/Text'; type Props = { options: RadioOption[]; selected?: string; onClick: (value: any) => void; }; export const RadioList = ({ options, selected, onClick }: Props) => ( {options?.map((option) => { const isSelected = option.value === selected; return ( !option.disabled && onClick(option.value)} > {option.icon && ( )} {option.label} {option.sublabel && ( {option.sublabel} )} ); })} );