2023-07-30 21:25:47 +00:00
|
|
|
import { Box, FormControlLabel } from "@mui/material";
|
2023-05-03 23:25:35 +00:00
|
|
|
import CustomizedSwitch from "@ui_kit/CustomSwitch";
|
|
|
|
import * as React from "react";
|
2023-04-15 09:10:59 +00:00
|
|
|
|
2023-05-03 23:25:35 +00:00
|
|
|
interface Props {
|
2023-04-15 09:10:59 +00:00
|
|
|
text: string;
|
2023-07-30 21:25:47 +00:00
|
|
|
icon: string;
|
|
|
|
onClick?: () => void;
|
2023-05-03 23:25:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const SwitchSetting = ({ text, icon, onClick }: Props) => {
|
2023-04-15 09:10:59 +00:00
|
|
|
return (
|
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
p: "14px",
|
|
|
|
mb: "14px",
|
|
|
|
display: "flex",
|
|
|
|
justifyContent: "space-between",
|
|
|
|
border: "1px solid #9A9AAF",
|
|
|
|
borderRadius: "8px",
|
|
|
|
alignItems: "center",
|
|
|
|
}}
|
|
|
|
>
|
2023-05-03 23:25:35 +00:00
|
|
|
<Box sx={{ display: "flex", alignItems: "center", justifyContent: "left", maxWidth: "756px", width: "100%" }}>
|
2023-04-15 09:10:59 +00:00
|
|
|
<img src={icon} alt="icon" />
|
2023-07-30 21:25:47 +00:00
|
|
|
<FormControlLabel
|
|
|
|
value="start"
|
|
|
|
control={<CustomizedSwitch />}
|
|
|
|
label={text}
|
|
|
|
labelPlacement="start"
|
|
|
|
sx={{
|
|
|
|
display: "flex",
|
|
|
|
justifyContent: "space-between",
|
|
|
|
color: "#9A9AAF",
|
|
|
|
width: "100%",
|
|
|
|
paddingRight: "15px",
|
|
|
|
}}
|
|
|
|
onClick={onClick}
|
|
|
|
/>
|
2023-05-03 23:25:35 +00:00
|
|
|
</Box>
|
2023-04-15 09:10:59 +00:00
|
|
|
</Box>
|
|
|
|
);
|
2023-04-23 08:39:34 +00:00
|
|
|
};
|