mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-12 04:37:13 +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
108 lines
1.9 KiB
SCSS
108 lines
1.9 KiB
SCSS
.actionable-message {
|
|
background: $Blue-000;
|
|
border: 1px solid $Blue-200;
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
margin-top: 18px;
|
|
display: flex;
|
|
flex-flow: column;
|
|
align-items: center;
|
|
position: relative;
|
|
|
|
@include H7;
|
|
|
|
&__message {
|
|
color: $Blue-600;
|
|
text-align: center;
|
|
}
|
|
|
|
&__actions {
|
|
display: flex;
|
|
width: 80%;
|
|
justify-content: space-evenly;
|
|
align-items: center;
|
|
margin-top: 10px;
|
|
color: $Blue-600;
|
|
}
|
|
|
|
&__action {
|
|
font-weight: bold;
|
|
}
|
|
|
|
&__info-tooltip-wrapper {
|
|
position: absolute;
|
|
right: 4px;
|
|
top: 8px;
|
|
}
|
|
|
|
&--warning {
|
|
background: $Yellow-100;
|
|
border: 1px solid $Yellow-500;
|
|
justify-content: center;
|
|
|
|
.actionable-message__message,
|
|
.actionable-message__action {
|
|
color: $Black-100;
|
|
}
|
|
|
|
.actionable-message__action--secondary {
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
|
|
&--danger {
|
|
background: $Red-000;
|
|
border: 1px solid $Red-300;
|
|
justify-content: flex-start;
|
|
|
|
.actionable-message__message {
|
|
color: $Black-100;
|
|
text-align: left;
|
|
}
|
|
|
|
button {
|
|
background: $Red-500;
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
&--left-aligned {
|
|
.actionable-message__message,
|
|
.actionable-message__actions {
|
|
}
|
|
}
|
|
|
|
&--with-right-button {
|
|
padding: 12px;
|
|
|
|
.actionable-message__message {
|
|
justify-content: flex-start;
|
|
text-align: left;
|
|
width: 100%;
|
|
}
|
|
|
|
.actionable-message__actions {
|
|
justify-content: flex-end;
|
|
width: 100%;
|
|
}
|
|
|
|
.actionable-message__action {
|
|
font-weight: normal;
|
|
border-radius: 42px;
|
|
min-width: 72px;
|
|
height: 18px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
|
|
@include H8;
|
|
}
|
|
}
|
|
}
|
|
|
|
.actionable-message--warning.actionable-message--with-right-button {
|
|
.actionable-message__action {
|
|
background: $Yellow-500;
|
|
}
|
|
}
|