import { motion } from 'framer-motion'; import { Flex } from '../../general/Flex/Flex'; import { RadioHighlight, RadioImage } from './RadioImages.style'; type RadioImageOption = { value: string; imageSrc: string; }; type Props = { options: RadioImageOption[]; selected?: string; onClick: (value: any) => void; }; export const RadioImages = ({ options = [], selected, onClick }: Props) => ( {options?.map((option) => { const isSelected = option.value === selected; return ( {isSelected && } onClick(option.value)} > ); })} );