-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: update UI of add account dropdown to use react-select
Identical UI with the select account dropdown in buy & sell page with icon and coin name on the option and selected value.
- Loading branch information
1 parent
9fe8aff
commit 502ec01
Showing
2 changed files
with
185 additions
and
19 deletions.
There are no files selected for viewing
95 changes: 95 additions & 0 deletions
95
frontends/web/src/routes/account/add/components/coin-dropdown.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
.dropdown { | ||
appearance: none; | ||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-labelledby='chevron down' color='%23777'%3E%3Cdefs/%3E%3Cpolyline points='6 10 12 16 18 10'/%3E%3C/svg%3E%0A"); | ||
background-repeat: no-repeat; | ||
font-weight: 400; | ||
height: calc(var(--space-quarter) * 3); | ||
padding: 0 calc(var(--space-quarter) + var(--space-eight)); | ||
} | ||
|
||
.select { | ||
margin-bottom: var(--space-half); | ||
} | ||
|
||
.select :global(.react-select__group-heading) { | ||
color: var(--color-default); | ||
font-size: var(--size-default); | ||
margin: 0; | ||
padding-right: var(--space-quarter); | ||
text-transform: unset; | ||
} | ||
|
||
.select :global(.react-select__menu) { | ||
background-color: var(--background-secondary); | ||
z-index: 14; | ||
} | ||
|
||
.select :global(.react-select__option) { | ||
background-color: var(--background-secondary); | ||
} | ||
|
||
.select :global(.react-select__option):hover { | ||
background-color: var(--background-custom-select-hover); | ||
} | ||
|
||
.select :global(.react-select__option--is-selected), | ||
.select :global(.react-select__option--is-selected):hover { | ||
background-color: var(--background-custom-select-selected); | ||
} | ||
|
||
.select :global(.react-select__option--is-disabled) span { | ||
color: var(--color-secondary); | ||
} | ||
|
||
.select :global(.react-select__option--is-disabled.react-select__option--is-selected):hover { | ||
background-color: var(--background-custom-select-selected); | ||
} | ||
|
||
.select :global(.react-select__option--is-disabled):hover { | ||
background-color: transparent; | ||
} | ||
|
||
.select :global(.react-select__option--is-selected) .balance { | ||
color: var(--color-default); | ||
} | ||
|
||
.select :global(.react-select__control) { | ||
background-color: var(--background-secondary); | ||
padding: var(--space-quarter) var(--space-eight); | ||
} | ||
|
||
.select :global(.react-select__single-value) { | ||
width: 100%; | ||
} | ||
|
||
.select :global(.react-select__option--is-selected) .selectLabelText { | ||
color: var(--color-default); | ||
} | ||
|
||
.singleValueContainer { | ||
align-items: center; | ||
display: flex; | ||
left: var(--space-quarter); | ||
position: absolute; | ||
width: 100%; | ||
} | ||
|
||
|
||
.valueContainer { | ||
align-items: center; | ||
color: var(--color-default); | ||
display: flex; | ||
} | ||
|
||
.valueContainer > img { | ||
width: 20px; | ||
height: 20px; | ||
} | ||
|
||
.selectLabelText { | ||
margin-left: 6px; | ||
} | ||
|
||
.chooseLabel { | ||
margin-left: 26px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters