From f93f9874320dd3a6e866ebde377c8990f217ff91 Mon Sep 17 00:00:00 2001 From: Shivansh Date: Wed, 23 Oct 2024 04:55:28 +0530 Subject: [PATCH] toggle password --- client/src/component/Login.jsx | 20 ++++++++------ client/src/component/Signup.jsx | 43 +++++++++++------------------- client/src/component/css/Login.css | 4 +-- 3 files changed, 29 insertions(+), 38 deletions(-) diff --git a/client/src/component/Login.jsx b/client/src/component/Login.jsx index 68b049e..3f5adba 100644 --- a/client/src/component/Login.jsx +++ b/client/src/component/Login.jsx @@ -81,8 +81,9 @@ const Login = ({ mode, showAlert }) => { }; return ( +
{ onChange={onChange} autoComplete="on" required + className="h-10 text-xl" style={{ backgroundColor: mode === "dark" ? "black" : "white", color: mode === "dark" ? "white" : "black", @@ -119,27 +121,28 @@ const Login = ({ mode, showAlert }) => { value={credentials.password} onChange={onChange} autoComplete="on" - iconRender={(visible) => - visible ? : - } + className="h-10 text-xl" style={{ backgroundColor: mode === "dark" ? "black" : "white", color: mode === "dark" ? "white" : "black", }} required + iconRender={(visible) => + visible ? : + } />
- -

Don't have an account? - + {" "} Sign Up @@ -148,7 +151,7 @@ const Login = ({ mode, showAlert }) => { @@ -200,6 +203,7 @@ const Login = ({ mode, showAlert }) => {

+ ); }; diff --git a/client/src/component/Signup.jsx b/client/src/component/Signup.jsx index 0fe7d53..62aaceb 100644 --- a/client/src/component/Signup.jsx +++ b/client/src/component/Signup.jsx @@ -1,4 +1,4 @@ -import { Eye, EyeOff } from "lucide-react"; + import { useState } from "react"; import { Link, useNavigate } from "react-router-dom"; import { Input } from "antd"; @@ -6,6 +6,10 @@ import PropTypes from "prop-types"; import "./css/Signup.css"; import { registerValidation } from "../validations/validation"; import toast from "react-hot-toast"; +import { + EyeInvisibleOutlined, + EyeTwoTone, +} from "@ant-design/icons"; const host = "http://localhost:5000"; @@ -156,8 +160,7 @@ const Signup = ({ mode }) => { > Password - setPassword(e.target.value)} id="password" @@ -170,19 +173,11 @@ const Signup = ({ mode }) => { backgroundColor: mode === "dark" ? "#333" : "white", color: mode === "dark" ? "white" : "black", }} + iconRender={(visible) => + visible ? : + } /> - +
@@ -195,8 +190,7 @@ const Signup = ({ mode }) => { > Confirm Password - setCPassword(e.target.value)} id="cpassword" @@ -209,18 +203,11 @@ const Signup = ({ mode }) => { backgroundColor: mode === "dark" ? "#333" : "white", color: mode === "dark" ? "white" : "black", }} + iconRender={(visible) => + visible ? : + } /> - + {errors.cpassword && (
{errors.cpassword}
)} diff --git a/client/src/component/css/Login.css b/client/src/component/css/Login.css index 635c1f7..c9c3466 100644 --- a/client/src/component/css/Login.css +++ b/client/src/component/css/Login.css @@ -82,7 +82,7 @@ body { .footer { margin-top: 20px; - font-size: 0.9rem; + /* font-size: 0.9rem; */ } .link { @@ -224,7 +224,7 @@ body { .footer { margin-top: 15px; - font-size: 0.85rem; + /* font-size: 0.85rem; */ } .link {