1- import { Dispatch , SetStateAction } from 'react' ;
2- import { ThemeType } from '../connect/ui/theme' ;
1+ import { Dispatch , SetStateAction , useEffect } from 'react' ;
2+ import { theme as themeImport , fonts } from '../connect/ui/theme' ;
33
44interface AuthMethodsProps {
55 setView : Dispatch < SetStateAction < string > > ;
6- theme : ThemeType ;
6+ clearError ?: ( ) => void ;
77}
88
9- const AuthMethods = ( { setView, theme } : AuthMethodsProps ) => {
9+ const AuthMethods = ( { setView, clearError } : AuthMethodsProps ) => {
10+ useEffect ( ( ) => {
11+ if ( clearError ) {
12+ clearError ( ) ;
13+ }
14+ } , [ clearError ] ) ;
15+
1016 return (
1117 < div className = "space-y-3" >
18+ < div className = "text-center mb-6" >
19+ < h2 className = "text-xl font-bold text-gray-900 dark:text-white mb-2" style = { fonts . heading } >
20+ Authentication Required
21+ </ h2 >
22+ < p className = "text-xs text-gray-600 dark:text-white/60" style = { fonts . body } >
23+ Please login in or sign up to continue.
24+ </ p >
25+ </ div >
1226 < div className = "flex flex-col items-center space-y-3" >
1327 < div
14- className = { `w-full sm:w-3/4 md:w-3/4 lg:w-full py-3 px-4 flex items-center justify-between ${ theme . cardBg } border ${ theme . cardBorder } rounded-lg ${ theme . itemHoverBg } transition-colors cursor-pointer` }
28+ className = { `w-full sm:w-3/4 md:w-3/4 lg:w-full py-3 px-4 flex items-center justify-between bg-white dark:bg-gray-950 border border-gray-200 dark:border-white/10 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.05] transition-colors cursor-pointer` }
1529 onClick = { ( ) => setView ( 'email' ) }
1630 >
1731 < div className = "flex items-center" >
18- < div className = { `w-5 h-5 mr-3 flex items-center justify-center ${ theme . textMuted } ` } >
19- < svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" className = "w-4 h-4" >
32+ < div className = { `w-5 h-5 mr-3 flex items-center justify-center` } >
33+ < svg
34+ viewBox = "0 0 24 24"
35+ fill = "none"
36+ stroke = { themeImport . brandOrange }
37+ className = "w-4 h-4"
38+ >
2039 < path
2140 strokeLinecap = "round"
2241 strokeLinejoin = "round"
@@ -25,10 +44,15 @@ const AuthMethods = ({ setView, theme }: AuthMethodsProps) => {
2544 />
2645 </ svg >
2746 </ div >
28- < span className = { `text-sm font-medium ${ theme . text } ` } > Email</ span >
47+ < span
48+ className = { `text-sm font-medium text-gray-900 dark:text-white` }
49+ style = { fonts . heading }
50+ >
51+ Email
52+ </ span >
2953 </ div >
3054 < svg
31- className = { `w-4 h-4 ${ theme . textMuted } ` }
55+ className = { `w-4 h-4 text-gray-600 dark:text-white/60 ` }
3256 fill = "none"
3357 stroke = "currentColor"
3458 viewBox = "0 0 24 24"
@@ -38,12 +62,17 @@ const AuthMethods = ({ setView, theme }: AuthMethodsProps) => {
3862 </ div >
3963
4064 < div
41- className = { `w-full sm:w-3/4 md:w-3/4 lg:w-full py-3 px-4 flex items-center justify-between ${ theme . cardBg } border ${ theme . cardBorder } rounded-lg ${ theme . itemHoverBg } transition-colors cursor-pointer` }
65+ className = { `w-full sm:w-3/4 md:w-3/4 lg:w-full py-3 px-4 flex items-center justify-between bg-white dark:bg-gray-950 border border-gray-200 dark:border-white/10 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.05] transition-colors cursor-pointer` }
4266 onClick = { ( ) => setView ( 'phone' ) }
4367 >
4468 < div className = "flex items-center" >
45- < div className = { `w-5 h-5 mr-3 flex items-center justify-center ${ theme . textMuted } ` } >
46- < svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" className = "w-4 h-4" >
69+ < div className = { `w-5 h-5 mr-3 flex items-center justify-center` } >
70+ < svg
71+ viewBox = "0 0 24 24"
72+ fill = "none"
73+ stroke = { themeImport . brandOrange }
74+ className = "w-4 h-4"
75+ >
4776 < path
4877 strokeLinecap = "round"
4978 strokeLinejoin = "round"
@@ -52,10 +81,15 @@ const AuthMethods = ({ setView, theme }: AuthMethodsProps) => {
5281 />
5382 </ svg >
5483 </ div >
55- < span className = { `text-sm font-medium ${ theme . text } ` } > Phone</ span >
84+ < span
85+ className = { `text-sm font-medium text-gray-900 dark:text-white` }
86+ style = { fonts . heading }
87+ >
88+ Phone
89+ </ span >
5690 </ div >
5791 < svg
58- className = { `w-4 h-4 ${ theme . textMuted } ` }
92+ className = { `w-4 h-4 text-gray-600 dark:text-white/60 ` }
5993 fill = "none"
6094 stroke = "currentColor"
6195 viewBox = "0 0 24 24"
@@ -65,12 +99,17 @@ const AuthMethods = ({ setView, theme }: AuthMethodsProps) => {
6599 </ div >
66100
67101 < div
68- className = { `w-full sm:w-3/4 md:w-3/4 lg:w-full py-3 px-4 flex items-center justify-between ${ theme . cardBg } border ${ theme . cardBorder } rounded-lg ${ theme . itemHoverBg } transition-colors cursor-pointer` }
102+ className = { `w-full sm:w-3/4 md:w-3/4 lg:w-full py-3 px-4 flex items-center justify-between bg-white dark:bg-gray-950 border border-gray-200 dark:border-white/10 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.05] transition-colors cursor-pointer` }
69103 onClick = { ( ) => setView ( 'wallet' ) }
70104 >
71105 < div className = "flex items-center" >
72- < div className = { `w-5 h-5 mr-3 flex items-center justify-center ${ theme . textMuted } ` } >
73- < svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" className = "w-4 h-4" >
106+ < div className = { `w-5 h-5 mr-3 flex items-center justify-center` } >
107+ < svg
108+ viewBox = "0 0 24 24"
109+ fill = "none"
110+ stroke = { themeImport . brandOrange }
111+ className = "w-4 h-4"
112+ >
74113 < path
75114 strokeLinecap = "round"
76115 strokeLinejoin = "round"
@@ -79,10 +118,15 @@ const AuthMethods = ({ setView, theme }: AuthMethodsProps) => {
79118 />
80119 </ svg >
81120 </ div >
82- < span className = { `text-sm font-medium ${ theme . text } ` } > Wallet</ span >
121+ < span
122+ className = { `text-sm font-medium text-gray-900 dark:text-white` }
123+ style = { fonts . heading }
124+ >
125+ Wallet
126+ </ span >
83127 </ div >
84128 < svg
85- className = { `w-4 h-4 ${ theme . textMuted } ` }
129+ className = { `w-4 h-4 text-gray-600 dark:text-white/60 ` }
86130 fill = "none"
87131 stroke = "currentColor"
88132 viewBox = "0 0 24 24"
@@ -92,12 +136,17 @@ const AuthMethods = ({ setView, theme }: AuthMethodsProps) => {
92136 </ div >
93137
94138 < div
95- className = { `w-full sm:w-3/4 md:w-3/4 lg:w-full py-3 px-4 flex items-center justify-between ${ theme . cardBg } border ${ theme . cardBorder } rounded-lg ${ theme . itemHoverBg } transition-colors cursor-pointer` }
139+ className = { `w-full sm:w-3/4 md:w-3/4 lg:w-full py-3 px-4 flex items-center justify-between bg-white dark:bg-gray-950 border border-gray-200 dark:border-white/10 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.05] transition-colors cursor-pointer` }
96140 onClick = { ( ) => setView ( 'webauthn' ) }
97141 >
98142 < div className = "flex items-center" >
99- < div className = { `w-5 h-5 mr-3 flex items-center justify-center ${ theme . textMuted } ` } >
100- < svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" className = "w-4 h-4" >
143+ < div className = { `w-5 h-5 mr-3 flex items-center justify-center` } >
144+ < svg
145+ viewBox = "0 0 24 24"
146+ fill = "none"
147+ stroke = { themeImport . brandOrange }
148+ className = "w-4 h-4"
149+ >
101150 < path
102151 strokeLinecap = "round"
103152 strokeLinejoin = "round"
@@ -106,10 +155,15 @@ const AuthMethods = ({ setView, theme }: AuthMethodsProps) => {
106155 />
107156 </ svg >
108157 </ div >
109- < span className = { `text-sm font-medium ${ theme . text } ` } > Passkey</ span >
158+ < span
159+ className = { `text-sm font-medium text-gray-900 dark:text-white` }
160+ style = { fonts . heading }
161+ >
162+ Passkey
163+ </ span >
110164 </ div >
111165 < svg
112- className = { `w-4 h-4 ${ theme . textMuted } ` }
166+ className = { `w-4 h-4 text-gray-600 dark:text-white/60 ` }
113167 fill = "none"
114168 stroke = "currentColor"
115169 viewBox = "0 0 24 24"
0 commit comments