64
64
</div >
65
65
66
66
<div class =" field-wrapper" >
67
- <ZeroDropdown : class =" [' country dropdown-field form-field', { error: fieldError.country }] " :display-selected =" true" >
68
- <template #toggle-button =" { togglePanel , selected } " >
69
- <div class =" toggle-button" @click =" togglePanel" >
70
- <p v-if =" selected" class =" toggle-button-label" >
67
+ <ZeroDropdown class =" country dropdown-field" :display-selected =" true" >
68
+ <template #toggle-button =" { togglePanel , panelOpen , selected } " >
69
+ <div : class =" [' toggle-button form-field', { error: fieldError.country }, { open: panelOpen } ] " @click =" togglePanel" >
70
+ <p v-if =" selected" class =" toggle-button-label selected " >
71
71
{{ selected.label }}
72
72
</p >
73
73
<p v-else class =" toggle-button-label" >
74
74
Country
75
75
</p >
76
+ <IconChevron />
76
77
</div >
77
78
</template >
78
79
<template #dropdown-panel =" { setSelected , closePanel } " >
79
80
<div class =" dropdown-panel" >
80
- <div
81
+ <p
81
82
v-for =" option in countryField.options"
82
83
:key =" option.code"
83
- class =" options" >
84
- <p
85
- class =" option-label"
86
- @click =" selectOption(setSelected, closePanel, option, 'country')"
87
- v-html =" option.label" />
88
- </div >
84
+ class =" option"
85
+ @click =" selectOption(setSelected, closePanel, option, 'country')"
86
+ v-html =" option.label" />
89
87
</div >
90
88
</template >
91
89
</ZeroDropdown >
@@ -257,6 +255,7 @@ const submitForm = async () => {
257
255
flex-flow : row no- wrap;
258
256
}
259
257
// //////////////////////////////////////////////////////////////////////// Form
258
+ // ---------------------------------------------------------------------- General
260
259
.form-field {
261
260
border : var (--brand-color ) 1px solid ;
262
261
border-radius : toRem (5 );
@@ -287,6 +286,10 @@ const submitForm = async () => {
287
286
margin-bottom : toRem (24 );
288
287
}
289
288
289
+ .submit-button {
290
+
291
+ }
292
+ // ----------------------------------------------------------------- Input Fields
290
293
.name-fields {
291
294
display : flex ;
292
295
flex-flow : row nowrap ;
@@ -306,16 +309,53 @@ const submitForm = async () => {
306
309
}
307
310
}
308
311
312
+ // -------------------------------------------------------------- Dropdown Fields
313
+ // .dropdown-field {
314
+ // padding: 0;
315
+ // }
316
+
317
+ .toggle-button {
318
+ display : flex ;
319
+ align-items : center ;
320
+ justify-content : space-between ;
321
+ & .open {
322
+ border-color : var (--secondary-text-color );
323
+ border-bottom-color : transparent ;
324
+ border-bottom-left-radius : 0 ;
325
+ border-bottom-right-radius : 0 ;
326
+ padding-bottom : toRem (4 );
327
+ }
328
+ }
329
+
309
330
.toggle-button-label {
310
331
@include formFieldPlaceholder ;
332
+ & .selected {
333
+ @include formFieldText ;
334
+ }
311
335
}
312
336
313
- .option-label {
314
- cursor : pointer ;
337
+ :deep(.panel-container ) {
338
+ width : 100% ;
339
+ z-index : 1 ;
340
+ top : calc (100% - 0.1rem );
341
+ padding-top : 0 ;
342
+ border : var (--secondary-text-color ) 1px solid ;
343
+ height : toRem (93 );
344
+ overflow-y : scroll ;
345
+ border-top-color : transparent ;
346
+ border-bottom-left-radius : toRem (5 );
347
+ border-bottom-right-radius : toRem (5 );
315
348
}
316
349
317
- .submit-button {
318
-
350
+ .option {
351
+ @include formFieldPlaceholder ;
352
+ cursor : pointer ;
353
+ padding : 0 toRem (20 ) toRem (4 );
354
+ background-color : #121212 ;
355
+ & :hover {
356
+ background-color : var (--secondary-text-color );
357
+ color : var (--background-color );
358
+ }
319
359
}
320
360
321
361
</style >
0 commit comments