import React, { memo } from 'react'; import RadioGroup from '@mui/material/RadioGroup'; import Radio from '@mui/material/Radio'; import type { RadioGroupProps } from '@mui/material/RadioGroup'; import FormControlLabel from '@mui/material/FormControlLabel'; import clsx from 'clsx'; import createClasses from './styles'; export interface RadioButtonsProps { /** * Items array that will be displayed as the radio options. */ items: { /** * Should be unique text */ text: string; selected: boolean; }[]; /** * The value is the text passed to the radio buttons. */ clickHandler: RadioGroupProps['onChange']; } const RadioButtons = (props: RadioButtonsProps) => { const { items, clickHandler } = props; const classes = createClasses(); return ( {items.map(item => { const { selected, text } = item; return ( } checkedIcon={} /> } /> ); })} ); }; const m = memo(RadioButtons); export { m as RadioButtons };