From 3d39e5e4c486067c4c51b0d9c0e0783df1278393 Mon Sep 17 00:00:00 2001 From: Bhumika Date: Fri, 25 Oct 2024 16:57:40 +0530 Subject: [PATCH] Edited accordingly for light theme --- src/css/Auth.css | 2 +- src/pages/auth/Login.jsx | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/css/Auth.css b/src/css/Auth.css index c0e3786..1fe1e8b 100644 --- a/src/css/Auth.css +++ b/src/css/Auth.css @@ -2,12 +2,12 @@ width: auto; max-width: 500px; border-radius: 0.75rem; - background-color: rgba(17, 24, 39, 1); padding: 2rem; color: rgba(243, 244, 246, 1); margin: auto; } + .title { text-align: center; font-size: 1.5rem; diff --git a/src/pages/auth/Login.jsx b/src/pages/auth/Login.jsx index 59713f7..0ae2229 100644 --- a/src/pages/auth/Login.jsx +++ b/src/pages/auth/Login.jsx @@ -1,7 +1,8 @@ -import React, { useState } from 'react'; +import React, { useState ,useContext} from 'react'; import axios from 'axios'; import '../../css/Auth.css'; import { FaGithub, FaGoogle, FaXTwitter, FaEye, FaEyeSlash } from 'react-icons/fa6'; +import { Context } from "../../context/Context"; const URL = `${import.meta.env.VITE_BACKEND_URL}/api/auth/login`; @@ -11,6 +12,7 @@ const Login = () => { const [passwordVisible, setPasswordVisible] = useState(false); const [error, setError] = useState(''); const [success, setSuccess] = useState(''); + const { isDarkMode } = useContext(Context); const togglePasswordVisibility = () => { setPasswordVisible(!passwordVisible); @@ -31,22 +33,22 @@ const Login = () => { }; return ( -
+

Login

{error &&

{error}

} {success &&

{success}

}
- - Email + setEmail(e.target.value)} required />
- +
- setPassword(e.target.value)} required />
- +
-

Login with social accounts

+

Login with social accounts

@@ -77,7 +79,7 @@ const Login = () => {
-

Don't have an account? +

Don't have an account? Sign up