From 95bdb998030c60378a89dbd0eb78fde06b0f573c Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Tue, 14 Nov 2023 00:59:32 +0800 Subject: [PATCH] Code cleanup and add login icon to login modal --- src/Components/Buttons/Button.tsx | 4 +- src/Components/LoginModal/LoginModal.tsx | 88 +++++++++++++++++------- src/styles.tsx | 12 ++++ 3 files changed, 78 insertions(+), 26 deletions(-) diff --git a/src/Components/Buttons/Button.tsx b/src/Components/Buttons/Button.tsx index aed3496..e5a4e76 100644 --- a/src/Components/Buttons/Button.tsx +++ b/src/Components/Buttons/Button.tsx @@ -27,8 +27,8 @@ export default function Button(props: props) { borderColor: colors.button_border, borderStyle: "solid", borderWidth: 2, - paddingBottom: "2vh", - paddingTop: "2vh", + paddingBottom: "0", + paddingTop: "0", paddingRight: "5vw", paddingLeft: "5vw", marginBottom: "0.5vh", diff --git a/src/Components/LoginModal/LoginModal.tsx b/src/Components/LoginModal/LoginModal.tsx index 3aea8a2..4ef16a4 100644 --- a/src/Components/LoginModal/LoginModal.tsx +++ b/src/Components/LoginModal/LoginModal.tsx @@ -1,35 +1,44 @@ import { useState } from "react"; import styles from "../../styles"; +import { colors } from "../../styles"; import TextField from "@mui/material/TextField"; import InputAdornment from "@mui/material/InputAdornment"; import IconButton from "@mui/material/IconButton"; import Visibility from "@mui/icons-material/Visibility"; import VisibilityOff from "@mui/icons-material/VisibilityOff"; - +import LoginIcon from "@mui/icons-material/Login"; +import Checkbox from "@mui/material/Checkbox"; +import Button from "../Buttons/Button"; export default function LoginModal() { const [showPassword, setShowPassword] = useState(false); + const [remember, setRemember] = useState(true); const [user, setUser] = useState({ username: "", password: "", }); return ( <> -

Welcome back!

+
+ +

Welcome back!

+
+
) => setUser({ ...user, username: e.target.value }) } @@ -39,17 +48,7 @@ export default function LoginModal() { @@ -70,7 +69,48 @@ export default function LoginModal() { } value={user.password} /> +
+
+ setRemember(!remember)} + /> +

Remember me

+
+
+

+ Forgot password? +

+
+
+
+