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

export type CustomTextFieldProps = {
    label: string,
    name: string,
    changeHandler: (event: React.ChangeEvent<HTMLInputElement>) => void,
    isMultline: boolean,
}

const CustomTextField = (props: CustomTextFieldProps) => {
    return (
        <TextField
            label={props.label}
            name={props.name}
            onChange={props.changeHandler}
            fullWidth={true}

            variant={"outlined"} //enables special material-ui styling
            size={"small"}
            multiline={props.isMultline}
            margin={"dense"}
        />
    );
}

export default CustomTextField;