mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 10:30:04 +01:00
c3b79bb358
* Show custom tokens in Swaps * Add messages for adding a custom token in Swaps * Add the first version of importing custom tokens in swaps * Fix lint rules * Create a new component: ImportToken * Remove a pointer cursor from regular heading * Fix a CSS issue for tokens with long names * Update a comment * Don’t return a custom token if it doesn’t have symbol or decimals * Only search by contract address if nothing was found * Track “Token Imported” event * Fix unit tests * Import tracking for “Token Imported”, increase token icon font size * Disable token import for Source Token * Update logic and content for notifications, update tests * Do not hide a dropdown placeholder on click, so a user can click on a link * Update a key name * Update styling for the “danger” type notification in Swaps * Show either a warning or danger notification based on token verification occurences * Remove testnets from SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP * Use the “shouldSearchForImports” prop * Create a new function for handling token import: “onOpenImportTokenModalClick” * Filter token duplicities before iterating over tokens * Use “address” instead of “symbol” for checking uniqueness * Trigger Build * Use a new API (/token) to get token data for importing in Swaps * Temporarily decrese Jest threshold for functions
212 lines
3.4 KiB
SCSS
212 lines
3.4 KiB
SCSS
.searchable-item-list {
|
|
background: $white;
|
|
width: 100%;
|
|
position: relative;
|
|
|
|
&__search {
|
|
> div {
|
|
border: none;
|
|
border-bottom: 1px solid $Grey-100;
|
|
border-radius: 0;
|
|
height: 55px;
|
|
font-size: 12px;
|
|
|
|
input {
|
|
@include H6;
|
|
|
|
color: $Grey-500;
|
|
line-height: 100%;
|
|
|
|
&::-webkit-input-placeholder {
|
|
color: $Grey-500;
|
|
opacity: 1;
|
|
}
|
|
|
|
&:-moz-placeholder {
|
|
color: $Grey-500;
|
|
opacity: 1;
|
|
}
|
|
|
|
&::-moz-placeholder {
|
|
color: $Grey-500;
|
|
opacity: 1;
|
|
}
|
|
|
|
&::placeholder {
|
|
color: $Grey-500;
|
|
opacity: 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&__list-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
&__item {
|
|
transition: 200ms ease-in-out;
|
|
display: flex;
|
|
flex-flow: row nowrap;
|
|
align-items: center;
|
|
padding: 8px 12px;
|
|
box-sizing: border-box;
|
|
cursor: pointer;
|
|
border-top: 1px solid $Grey-100;
|
|
position: relative;
|
|
min-height: 50px;
|
|
|
|
&:first-of-type {
|
|
border-top: none;
|
|
}
|
|
|
|
&:last-of-type {
|
|
border-bottom: none;
|
|
}
|
|
|
|
&:hover,
|
|
&:focus {
|
|
background: $Grey-000;
|
|
}
|
|
|
|
&--selected {
|
|
border: 1px solid $malibu-blue !important;
|
|
}
|
|
|
|
&--disabled {
|
|
opacity: 0.4;
|
|
pointer-events: none;
|
|
}
|
|
|
|
&--add-token {
|
|
min-height: auto;
|
|
opacity: 1;
|
|
pointer-events: none;
|
|
|
|
&:hover {
|
|
background: none;
|
|
}
|
|
|
|
.actionable-message {
|
|
margin: 0;
|
|
|
|
&__message {
|
|
text-align: left;
|
|
color: $Black-100;
|
|
}
|
|
|
|
a {
|
|
pointer-events: auto;
|
|
color: #037dd6;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
}
|
|
|
|
.btn-primary {
|
|
@include H7;
|
|
|
|
width: auto;
|
|
padding: 7px 11px;
|
|
}
|
|
|
|
> img {
|
|
margin-top: -2px;
|
|
}
|
|
}
|
|
|
|
&__primary-label {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
min-width: 0;
|
|
|
|
@include H6;
|
|
|
|
line-height: 100%;
|
|
font-weight: bold;
|
|
padding-top: 4px;
|
|
padding-bottom: 3px;
|
|
}
|
|
|
|
&__item-name {
|
|
/*rtl:ignore*/
|
|
direction: ltr;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
&__labels {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
max-width: 237px;
|
|
flex: 1;
|
|
-moz-animation: fadein 1s;
|
|
-webkit-animation: fadein 1s;
|
|
-o-animation: fadein 1s;
|
|
}
|
|
|
|
&__item-labels {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
margin-left: 12px;
|
|
}
|
|
|
|
&__right-labels {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: flex-end;
|
|
max-width: 100%;
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
&__secondary-label,
|
|
&__right-primary-label {
|
|
@include H7;
|
|
|
|
line-height: 100%;
|
|
color: $Grey-500;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
padding-bottom: 4px;
|
|
}
|
|
|
|
&__right-primary-label {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
&__right-secondary-label {
|
|
@include H7;
|
|
|
|
line-height: 100%;
|
|
color: $Grey-500;
|
|
opacity: 0.5;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
&__list-container {
|
|
z-index: 1002;
|
|
background: white;
|
|
}
|
|
|
|
&__search {
|
|
z-index: 1001;
|
|
}
|
|
|
|
&__item--highlighted {
|
|
background: $Grey-000;
|
|
}
|
|
|
|
&__identicon {
|
|
margin-top: -2px;
|
|
}
|
|
}
|