// ** MUI Imports import Box from '@mui/material/Box' import Grid from '@mui/material/Grid' import Radio from '@mui/material/Radio' import Typography from '@mui/material/Typography' // ** Type Imports import { CustomRadioIconsProps } from 'src/@core/components/custom-radio/types' // ** Icon Imports import Icon from 'src/@core/components/icon' const CustomRadioIcons = (props: CustomRadioIconsProps) => { // ** Props const { data, icon, name, selected, gridProps, iconProps, handleChange, color = 'primary' } = props const { title, value, content } = data const renderComponent = () => { return ( handleChange(value)} sx={{ p: 4, height: '100%', display: 'flex', borderRadius: 1, cursor: 'pointer', position: 'relative', alignItems: 'center', flexDirection: 'column', border: theme => `1px solid ${theme.palette.divider}`, ...(selected === value ? { borderColor: `${color}.main` } : { '&:hover': { borderColor: theme => `rgba(${theme.palette.customColors.main}, 0.25)` } }) }} > {icon ? : null} {title ? ( typeof title === 'string' ? ( {title} ) : ( title ) ) : null} {content ? ( typeof content === 'string' ? ( {content} ) : ( content ) ) : null} ) } return data ? renderComponent() : null } export default CustomRadioIcons