fix bug save data in wrong key && change functionality data && clean code component

This commit is contained in:
Ehsan
2025-08-06 18:06:41 +03:30
parent 7e61867e3d
commit 8e4f182868
6 changed files with 111 additions and 73 deletions
+29
View File
@@ -0,0 +1,29 @@
import { FormControlLabel, Radio, RadioGroup } from "@mui/material";
function Radios({ group, value, changeData, name }) {
return (
<RadioGroup
value={value}
className="radio-mui"
onChange={(e) => changeData(e.target.value, name)}
sx={{
"& .MuiFormControlLabel-root": {
marginRight: "0 !important",
transform: "translateX(9px)",
},
}}
>
{group.map((item, idx) => (
<FormControlLabel
control={<Radio className="!ml-2" />}
className="!text-[#525252]"
label={item}
value={item}
key={idx}
/>
))}
</RadioGroup>
);
}
export default Radios;