11import React , { useState , ChangeEvent , FormEvent , useContext } from "react" ;
22import axios from "axios" ;
33import { useNavigate , Link } from "react-router-dom" ;
4+ import { motion } from "framer-motion" ;
45import { ThemeContext } from "../../context/ThemeContext" ;
56import type { ThemeContextType } from "../../context/ThemeContext" ;
67
@@ -65,7 +66,12 @@ const Login: React.FC = () => {
6566
6667 < div className = "relative w-full max-w-md px-4 sm:px-6" >
6768 { /* Branding */ }
68- < div className = "text-center mb-10" >
69+ < motion . div
70+ initial = { { opacity : 0 , y : - 20 } }
71+ animate = { { opacity : 1 , y : 0 } }
72+ transition = { { duration : 0.6 } }
73+ className = "text-center mb-10"
74+ >
6975 < div className = "inline-flex items-center justify-center w-20 h-20 bg-white rounded-3xl mb-6 shadow-2xl transform hover:scale-105 transition-transform duration-300 overflow-hidden" >
7076 < img src = "/crl-icon.png" alt = "Logo" className = "w-14 h-14 object-contain" />
7177 </ div >
@@ -80,10 +86,15 @@ const Login: React.FC = () => {
8086 < p className = { `${ mode === "dark" ? "text-slate-300" : "text-gray-700" } text-lg font-medium` } >
8187 Track your GitHub journey
8288 </ p >
83- </ div >
89+ </ motion . div >
8490
8591 { /* Form Card */ }
86- < div className = { `rounded-3xl p-6 sm:p-10 shadow-2xl border ${ mode === "dark" ? "bg-white/10 backdrop-blur-xl border-white/20 text-white" : "bg-white border-gray-200 text-black" } ` } >
92+ < motion . div
93+ initial = { { opacity : 0 , y : 30 } }
94+ animate = { { opacity : 1 , y : 0 } }
95+ transition = { { duration : 0.6 , delay : 0.2 } }
96+ className = { `rounded-3xl p-6 sm:p-10 shadow-2xl border ${ mode === "dark" ? "bg-white/10 backdrop-blur-xl border-white/20 text-white" : "bg-white border-gray-200 text-black" } ` }
97+ >
8798 < h2 className = { `text-2xl font-bold text-center mb-8 ${ mode === "dark" ? "text-white" : "text-gray-800" } ` } >
8899 Welcome Back
89100 </ h2 >
@@ -155,10 +166,10 @@ const Login: React.FC = () => {
155166 </ Link >
156167 </ p >
157168 </ div >
158- </ div >
169+ </ motion . div >
159170 </ div >
160171
161- < div className = { `${ mode === "dark" ? "from-slate-900" : "from-slate-100" } absolute bottom-0 left-0 w-full h-20 bg-gradient-to-t to-transparent` } />
172+ < div className = { `${ mode === "dark" ? "from-slate-900" : "from-slate-100" } absolute bottom-0 left-0 w-full h-20 bg-gradient-to-t to-transparent pointer-events-none ` } />
162173 </ div >
163174 ) ;
164175} ;
0 commit comments