Skip to content

Instantly share code, notes, and snippets.

@borislavstoychev
Created April 2, 2022 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save borislavstoychev/90b214644dc14886163159f2b9e22ac5 to your computer and use it in GitHub Desktop.
Save borislavstoychev/90b214644dc14886163159f2b9e22ac5 to your computer and use it in GitHub Desktop.
radio
<FormControl required component="fieldset">
<Field component={RadioGroup} row name="amount">
<FormControlLabel
className={status === '2' ? classes.checked : classes.button}
value="2"
control={
<Radio
sx={{ '& .MuiSvgIcon-root': { fontSize: 39 }, marginRight: 5 }}
icon={<CircleOutlinedIcon />}
checkedIcon={<CheckCircleIcon color="info" />}
/>
}
label={<span style={{ fontSize: '20px' }}>2 лв.</span>}
/>
<FormControlLabel
className={status === '20' ? classes.checked : classes.button}
value="20"
control={
<Radio
sx={{ '& .MuiSvgIcon-root': { fontSize: 39 }, marginRight: 5 }}
icon={<CircleOutlinedIcon />}
checkedIcon={<CheckCircleIcon color="info" />}
/>
}
label={<span style={{ fontSize: '20px' }}>20 лв.</span>}
/>
<FormControlLabel
className={status === '5' ? classes.checked : classes.button}
value="5"
control={
<Radio
sx={{ '& .MuiSvgIcon-root': { fontSize: 39 }, marginRight: 5 }}
icon={<CircleOutlinedIcon />}
checkedIcon={<CheckCircleIcon color="info" />}
/>
}
label={<span style={{ fontSize: '20px' }}>5 лв.</span>}
/>
<FormControlLabel
className={status === '50' ? classes.checked : classes.button}
value="50"
control={
<Radio
sx={{ '& .MuiSvgIcon-root': { fontSize: 39 }, marginRight: 5 }}
icon={<CircleOutlinedIcon />}
checkedIcon={<CheckCircleIcon color="info" />}
/>
}
label={<span style={{ fontSize: '20px' }}>50 лв.</span>}
/>
<FormControlLabel
className={status === '10' ? classes.checked : classes.button}
value="10"
control={
<Radio
sx={{ '& .MuiSvgIcon-root': { fontSize: 39 }, marginRight: 5 }}
icon={<CircleOutlinedIcon />}
checkedIcon={<CheckCircleIcon color="info" />}
/>
}
label={<span style={{ fontSize: '20px' }}>10 лв.</span>}
/>
<FormControlLabel
className={status === '100' ? classes.checked : classes.button}
value="100"
control={
<Radio
sx={{ '& .MuiSvgIcon-root': { fontSize: 39 }, marginRight: 5 }}
icon={<CircleOutlinedIcon />}
checkedIcon={<CheckCircleIcon color="info" />}
/>
}
label={<span style={{ fontSize: '20px' }}>100 лв.</span>}
/>
</Field>
</FormControl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment