1
1
"use client" ;
2
2
import { Input } from "@/components/ui/input" ;
3
+ import { cn } from "@/lib/utils" ;
3
4
import { ChevronRight } from "lucide-react" ;
4
- import React from "react" ;
5
+ import React , { useState } from "react" ;
5
6
6
7
export default function FUILoginWithGridProvider ( ) {
8
+ const [ reset , setReset ] = useState ( false ) ;
7
9
return (
8
10
< main className = "w-full min-h-screen flex flex-col items-center justify-center sm:px-4 relative" >
9
- < div class = "absolute top-0 z-[0] h-screen w-screen bg-purple-950/10 bg-[radial-gradient(ellipse_20%_80%_at_50%_-20%,rgba(120,119,198,0.3),rgba(255,255,255,0))]" > </ div >
10
-
11
+ < div className = "absolute top-0 z-[0] h-screen w-screen bg-purple-950/10 bg-[radial-gradient(ellipse_20%_80%_at_50%_-20%,rgba(120,119,198,0.3),rgba(255,255,255,0))]" > </ div >
11
12
< div className = "w-full space-y-6 text-gray-600 sm:max-w-md px-5 py-3 rounded-2xl transform-gpu dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#8686f01f_inset]" >
12
13
< div className = "text-center" >
13
14
< img
@@ -19,7 +20,7 @@ export default function FUILoginWithGridProvider() {
19
20
< h3 className = "text-gray-200 text-2xl font-normal sm:text-3xl tracking-tighter font-geist" >
20
21
Log in to your account
21
22
</ h3 >
22
- < p className = "" >
23
+ < p className = "text-gray-400 " >
23
24
Don't have an account?{ " " }
24
25
< a
25
26
href = "javascript:void(0)"
@@ -32,9 +33,16 @@ export default function FUILoginWithGridProvider() {
32
33
</ div >
33
34
< div className = "bg-transparent shadow p-4 py-6 space-y-8 sm:p-6 sm:rounded-lg" >
34
35
< div className = "grid grid-cols-3 gap-x-3" >
35
- < button className = "flex transform-gpu dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#8686f01f_inset] border-white/10 items-center justify-center py-2.5 border rounded-lg hover:bg-gray-50 duration-150 active:bg-gray-100" >
36
+ < button
37
+ onMouseEnter = { ( ) => setReset ( false ) }
38
+ onMouseLeave = { ( ) => setReset ( true ) }
39
+ className = "group flex transform-gpu dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#8686f01f_inset] border-white/10 items-center justify-center py-2.5 border rounded-lg hover:bg-transparent/50 duration-150 active:bg-transparent/50"
40
+ >
36
41
< svg
37
- className = "w-5 h-5"
42
+ className = { cn (
43
+ "w-5 h-5 group-hover:-translate-y-1 duration-300 transition-all " ,
44
+ reset ? "translate-y-0" : "tranistion-transform"
45
+ ) }
38
46
viewBox = "0 0 48 48"
39
47
fill = "none"
40
48
xmlns = "http://www.w3.org/2000/svg"
@@ -64,9 +72,17 @@ export default function FUILoginWithGridProvider() {
64
72
</ defs >
65
73
</ svg >
66
74
</ button >
67
- < button className = "flex transform-gpu dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#8686f01f_inset] border-white/10 items-center justify-center py-2.5 border rounded-lg hover:bg-gray-50 duration-150 active:bg-gray-100" >
75
+
76
+ < button
77
+ onMouseEnter = { ( ) => setReset ( false ) }
78
+ onMouseLeave = { ( ) => setReset ( true ) }
79
+ className = "group flex transform-gpu dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#8686f01f_inset] border-white/10 items-center justify-center py-2.5 border rounded-lg hover:bg-transparent/50 duration-150 active:bg-transparent/50"
80
+ >
68
81
< svg
69
- className = "w-5 h-5"
82
+ className = { cn (
83
+ "w-5 h-5 group-hover:-translate-y-1 duration-300 transition-all " ,
84
+ reset ? "translate-y-0" : "tranistion-transform"
85
+ ) }
70
86
viewBox = "0 0 48 48"
71
87
fill = "none"
72
88
xmlns = "http://www.w3.org/2000/svg"
@@ -77,9 +93,16 @@ export default function FUILoginWithGridProvider() {
77
93
/>
78
94
</ svg >
79
95
</ button >
80
- < button className = "flex transform-gpu dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#8686f01f_inset] border-white/10 items-center justify-center py-2.5 border rounded-lg hover:bg-gray-50 duration-150 active:bg-gray-100" >
96
+ < button
97
+ onMouseEnter = { ( ) => setReset ( false ) }
98
+ onMouseLeave = { ( ) => setReset ( true ) }
99
+ className = "group flex transform-gpu dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#8686f01f_inset] border-white/10 items-center justify-center py-2.5 border rounded-lg hover:bg-transparent/50 duration-150 active:bg-transparent/50"
100
+ >
81
101
< svg
82
- className = "w-5 h-5"
102
+ className = { cn (
103
+ "w-5 h-5 group-hover:-translate-y-1 duration-300 transition-all " ,
104
+ reset ? "translate-y-0" : "tranistion-transform"
105
+ ) }
83
106
viewBox = "0 0 48 48"
84
107
fill = "currentColor"
85
108
xmlns = "http://www.w3.org/2000/svg"
@@ -136,15 +159,19 @@ export default function FUILoginWithGridProvider() {
136
159
</ div >
137
160
< form onSubmit = { ( e ) => e . preventDefault ( ) } className = "space-y-5" >
138
161
< div >
139
- < label className = "font-medium text-gray-100/50 font-geist" > Email</ label >
162
+ < label className = "font-medium text-gray-100/50 font-geist" >
163
+ Email
164
+ </ label >
140
165
< Input
141
166
type = "email"
142
167
required
143
168
className = "w-full mt-2 px-3 py-3 text-gray-500 bg-transparent outline-none border focus:border-purple-600 shadow-sm rounded-lg"
144
169
/>
145
170
</ div >
146
171
< div >
147
- < label className = "font-medium text-gray-100/50 font-geist" > Password</ label >
172
+ < label className = "font-medium text-gray-100/50 font-geist" >
173
+ Password
174
+ </ label >
148
175
< Input
149
176
type = "password"
150
177
required
@@ -154,7 +181,6 @@ export default function FUILoginWithGridProvider() {
154
181
< button className = "w-full group px-4 py-4 font-geist tracking-tighter text-xl text-white font-medium bg-purple-200/10 transform-gpu dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#8686f01f_inset] hover:bg-transparent/10 active:bg-purple-600 rounded-lg duration-150" >
155
182
Sign in
156
183
< ChevronRight className = "inline-flex justify-center items-center w-4 h-4 ml-2 group-hover:translate-x-1 duration-300" />
157
-
158
184
</ button >
159
185
</ form >
160
186
</ div >
0 commit comments