File tree Expand file tree Collapse file tree 2 files changed +28
-20
lines changed
firebaseui-react/src/components Expand file tree Collapse file tree 2 files changed +28
-20
lines changed Original file line number Diff line number Diff line change @@ -18,24 +18,28 @@ export function CountrySelector({
18
18
< div className = { cn ( "fui-country-selector" , className ) } >
19
19
< div className = "fui-country-selector__wrapper" >
20
20
< span className = "fui-country-selector__flag" > { value . emoji } </ span >
21
- < select
22
- value = { value . code }
23
- onChange = { ( e ) => {
24
- const country = countryData . find ( ( c ) => c . code === e . target . value ) ;
25
- if ( country ) {
26
- onChange ( country ) ;
27
- }
28
- } }
29
- >
30
- { countryData . map ( ( country ) => (
31
- < option
32
- key = { `${ country . code } -${ country . dialCode } ` }
33
- value = { country . code }
34
- >
35
- { country . dialCode } ({ country . name } )
36
- </ option >
37
- ) ) }
38
- </ select >
21
+ < div className = "fui-country-selector__select-wrapper" >
22
+ < span className = "fui-country-selector__dial-code" > { value . dialCode } </ span >
23
+ < select
24
+ className = "fui-country-selector__select"
25
+ value = { value . code }
26
+ onChange = { ( e ) => {
27
+ const country = countryData . find ( ( c ) => c . code === e . target . value ) ;
28
+ if ( country ) {
29
+ onChange ( country ) ;
30
+ }
31
+ } }
32
+ >
33
+ { countryData . map ( ( country ) => (
34
+ < option
35
+ key = { `${ country . code } -${ country . dialCode } ` }
36
+ value = { country . code }
37
+ >
38
+ { country . dialCode } ({ country . name } )
39
+ </ option >
40
+ ) ) }
41
+ </ select >
42
+ </ div >
39
43
</ div >
40
44
</ div >
41
45
) ;
Original file line number Diff line number Diff line change 126
126
}
127
127
128
128
.fui-country-selector {
129
- @apply relative inline-block min- w-[120 px ];
129
+ @apply relative inline-block w-[80 px ];
130
130
}
131
131
132
132
.fui-country-selector__wrapper {
138
138
}
139
139
140
140
.fui-country-selector select {
141
- @apply w-full pl-8 pr-2 py-2 text-sm focus:outline-2 focus:outline-primary shadow-xs bg-transparent appearance-none cursor-pointer;
141
+ @apply w-full pl-8 pr-2 py-2 text-sm focus:outline-2 focus:outline-primary shadow-xs bg-transparent appearance-none cursor-pointer text-transparent;
142
+ }
143
+
144
+ .fui-country-selector__dial-code {
145
+ @apply absolute left-8 top-1/2 -translate-y-1/2 text-sm pointer-events-none text-text;
142
146
}
143
147
}
You can’t perform that action at this time.
0 commit comments