import React from "react";
import Switch from "@mui/material/Switch";
import FormControlLabel from "@mui/material/FormControlLabel";
import "./Switch.css";

export default function Switche(props) {
  return (
    <div>
      <FormControlLabel
        size="large"
        value="end"
        control={<Switch color="primary" />}
        label={props.title}
        labelPlacement="front"
        onChange={props.sendDataToParent}
      />
    </div>
  );
}
