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
128 lines
2.2 KiB
SCSS
128 lines
2.2 KiB
SCSS
.slippage-buttons {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
|
|
&__header {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 0;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
background: unset;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
&__header-text {
|
|
@include H6;
|
|
|
|
margin-right: 6px;
|
|
font-weight: 900;
|
|
}
|
|
|
|
&__content {
|
|
padding-left: 10px;
|
|
}
|
|
|
|
&__dropdown-content {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
&__buttons-prefix {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
&__prefix-text {
|
|
@include H6;
|
|
|
|
margin-right: 4px;
|
|
color: black;
|
|
font-weight: 900;
|
|
}
|
|
|
|
&__error-text {
|
|
@include H7;
|
|
|
|
color: $Red-500;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
&__button-group {
|
|
& &-custom-button {
|
|
cursor: text;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
min-width: 72px;
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
|
|
&__custom-input {
|
|
display: flex;
|
|
justify-content: center;
|
|
|
|
input {
|
|
border: none;
|
|
width: 64px;
|
|
text-align: center;
|
|
background: $Blue-500;
|
|
color: white;
|
|
font-weight: inherit;
|
|
|
|
&::-webkit-input-placeholder { /* WebKit, Blink, Edge */
|
|
color: white;
|
|
}
|
|
|
|
&:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
|
|
color: white;
|
|
opacity: 1;
|
|
}
|
|
|
|
&::-moz-placeholder { /* Mozilla Firefox 19+ */
|
|
color: white;
|
|
opacity: 1;
|
|
}
|
|
|
|
&:-ms-input-placeholder { /* Internet Explorer 10-11 */
|
|
color: white;
|
|
}
|
|
|
|
&::-ms-input-placeholder { /* Microsoft Edge */
|
|
color: white;
|
|
}
|
|
|
|
&::placeholder { /* Most modern browsers support this now. */
|
|
color: white;
|
|
}
|
|
}
|
|
|
|
input::-webkit-outer-spin-button,
|
|
input::-webkit-inner-spin-button {
|
|
/* display: none; <- Crashes Chrome on hover */
|
|
-webkit-appearance: none;
|
|
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
|
|
}
|
|
|
|
input[type=number] {
|
|
-moz-appearance: textfield;
|
|
}
|
|
|
|
&--danger {
|
|
input {
|
|
background: $Red-500;
|
|
}
|
|
}
|
|
}
|
|
|
|
&__percentage-suffix {
|
|
position: absolute;
|
|
right: 5px;
|
|
}
|
|
}
|