i need to add CheckCircleSharpIcon from ‘@mui/icons-material/CheckCircleSharp’ instead of bullet icon
{res?.map((radiooption, index) => (
<>
<RadioGroup
aria-labelledby="demo-radio-buttons-group-label"
name="radio-buttons-group"
className={classes.radioGroup}
value={value}
onChange={handleChange}
key={radiooption.secondaryRadioName}
>
<FormControlLabel className={classes.radioButton} value=
{radiooption?.secondaryRadioName} control={<Radio />} label={<span
dangerouslySetInnerHTML={{ __html: radiooption?.secondaryRadioName }}/>}
/>
</RadioGroup>
</>
))}
2
Answers
According to the API, you can utilize its
checkedIcon
prop, so the Radio component should looks like thisLink to the
checkedIcon
props info: https://mui.com/material-ui/api/radio/#Radio-prop-checkedIconCodeSandbox working demo (see line 20): https://codesandbox.io/s/bold-cloud-xhylt5?file=/Demo.tsx:718-761
=> You need to add
checkedIcon
property in the control this way:Sample Code: https://codesandbox.io/s/brave-einstein-cgqfrk?file=/Demo.js
Let me know, if you have any doubt. Thanks.