import * as React from 'react'; import Logo from '../../../logo/Logo'; import Text from '../../../text/Text'; import Flex from '../../../flex/Flex'; import Icon from '../../../icons/Icon'; import Headline from '../../../text/Headline'; import useRadioContext from '../useRadioContext'; import Radio from '../Radio'; type WrapperType = 'plus' | 'tutor'; type BenefitsType = { title: string; items: Array; }; const LOGO: { plus: 'brainly-plus'; tutor: 'brainly-tutoring'; } = { plus: 'brainly-plus', tutor: 'brainly-tutoring', }; const CustomRadioComponent = ({ value, type, benefits, }: { value: string; type: WrapperType; benefits: BenefitsType; }) => { const {selectedValue, setSelectedValue, lastFocusedValue} = useRadioContext(); const labelId = `label-${value}`; const descriptionId = `description-${value}`; const {title, items} = benefits; const Benefit = ({item}: {item: string}) => { return ( {item} ); }; const borderColor = lastFocusedValue === value ? 'var(--blue-40)' : value === selectedValue ? 'var(--black)' : 'var(--gray-30)'; return (
{ setSelectedValue(e, value); }} style={{ width: '50%', position: 'relative', border: '2px solid black', borderColor, borderRadius: '8px', padding: '24px', marginRight: '10px', }} > Brainly {value} {title} {[...items].map((item, index) => ( ))}
); }; export {CustomRadioComponent};