import { TextField } from "@mui/material";

function Field({ title, type, multiline, isPlaceHolder }) {
  return (
    <TextField
      placeholder={isPlaceHolder && title}
      label={!isPlaceHolder ? title : ""}
      type={type || "text"}
      multiline={!!multiline}
      rows={!!multiline ? 4 : 1}
      className="!w-full !mx-auto !bg-[#FFF]"
      sx={{
        "& .MuiFormLabel-root": {
          top: "-4px !important",
        },
        "& .MuiInputBase-input": { padding: "12.5px 14px" },
        "& .MuiInputBase-root": { borderRadius: "6px !important" },
        "& .MuiOutlinedInput-notchedOutline": {
          border: "1px solid #E9ECEF !important",
        },
        ".Mui-focused": {
          "& .MuiOutlinedInput-notchedOutline": {
            border: "1px solid #5559CE !important",
            transition: "0.5s all",
          },
        },
      }}
    />
  );
}

export default Field;
