fix bug save data in wrong key && change functionality data && clean code component
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { FormControlLabel, Switch } from "@mui/material";
|
||||
|
||||
function SwitchContent({ data }) {
|
||||
return (
|
||||
<div className="flex items-center justify-start gap-[12px]">
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
checked={data.turn}
|
||||
onChange={(event) => {
|
||||
changeData(event.target.checked ? 1 : 0, "turn");
|
||||
}}
|
||||
/>
|
||||
}
|
||||
sx={{
|
||||
".MuiFormControlLabel-label": {
|
||||
color: "#3B3B3B",
|
||||
fontSize: "16px",
|
||||
fontWeight: 500,
|
||||
},
|
||||
marginLeft: "0 !important",
|
||||
}}
|
||||
label="فقط پزشکان دارای نوبت"
|
||||
labelPlacement="start"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default SwitchContent;
|
||||
Reference in New Issue
Block a user