diff --git a/frontend/src/Components/LoginField.tsx b/frontend/src/Components/LoginField.tsx new file mode 100644 index 0000000..7f43ec2 --- /dev/null +++ b/frontend/src/Components/LoginField.tsx @@ -0,0 +1,54 @@ +import { Dispatch, FormEventHandler, SetStateAction } from "react"; +import Button from "./Button"; +import InputField from "./InputField"; + +/** + * A login field complete with input fields + * and a button for submitting the information + * @param props - Settings + * @returns {JSX.Element} A login component + * @example + * + */ +function Login(props: { + handleSubmit: FormEventHandler; + setUsername: Dispatch>; + setPassword: Dispatch>; + username: string; + password: string; +}): JSX.Element { + return ( +
+ { + props.setUsername(e.target.value); + }} + value={props.username} + /> + { + props.setPassword(e.target.value); + }} + value={props.password} + /> +