2020-05-15 20:53:52 +02:00
|
|
|
.connected-accounts-list {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
&__identicon {
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__account-name {
|
2020-10-29 16:03:29 +01:00
|
|
|
@include H6;
|
|
|
|
|
2020-06-15 21:08:53 +02:00
|
|
|
display: inline;
|
2020-05-15 20:53:52 +02:00
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
2020-06-15 21:08:53 +02:00
|
|
|
%account-status-typography {
|
2020-10-29 16:03:29 +01:00
|
|
|
@include H7;
|
|
|
|
|
2020-06-15 21:08:53 +02:00
|
|
|
padding-top: 4px;
|
|
|
|
}
|
|
|
|
|
2020-05-15 20:53:52 +02:00
|
|
|
&__account-status {
|
2020-06-15 21:08:53 +02:00
|
|
|
@extend %account-status-typography;
|
2020-07-15 15:13:40 +02:00
|
|
|
|
2020-06-15 21:08:53 +02:00
|
|
|
display: inline;
|
2022-03-16 15:49:25 +01:00
|
|
|
color: var(--color-text-alternative);
|
2020-05-15 20:53:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
&__account-status-link {
|
2020-06-15 21:08:53 +02:00
|
|
|
@extend %account-status-typography;
|
2020-07-15 15:13:40 +02:00
|
|
|
|
2020-06-15 21:08:53 +02:00
|
|
|
display: block;
|
|
|
|
|
2020-07-15 15:13:40 +02:00
|
|
|
&,
|
|
|
|
&:hover {
|
2022-03-16 15:49:25 +01:00
|
|
|
color: var(--color-primary-default);
|
2020-05-15 20:53:52 +02:00
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__row {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
|
|
|
width: 100%;
|
|
|
|
padding: 16px 24px;
|
2022-03-16 15:49:25 +01:00
|
|
|
border-top: 1px solid var(--color-border-muted);
|
2020-05-15 20:53:52 +02:00
|
|
|
|
|
|
|
&--highlight {
|
2022-03-16 15:49:25 +01:00
|
|
|
background-color: var(--color-warning-muted);
|
|
|
|
border: 1px solid var(--color-warning-default);
|
2020-05-15 20:53:52 +02:00
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 16px;
|
|
|
|
margin-bottom: 16px;
|
2020-07-15 15:13:40 +02:00
|
|
|
width: calc(100% - 16px);
|
2020-05-15 20:53:52 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__row-content {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.connected-accounts-options {
|
Improve account options menu (#8607)
The account options menu is now much faster, and it correctly closes
when 'Switch account' is selected.
A static width had to be set on the menu so that it could be positioned
reliably. Without this width set, it was rendered as a different size
before positioning than after, which resulted in it being positioned
incorrectly. A `z-index` had to be added (equal to the `z-index` used
by the popover component) to ensure it wasn't rendered beneath the
popover.
The menu is automatically positioned relative to the account options
button, appearing below the button by default but above it instead if
there isn't room below. It is positioned to be inside the bounds of the
popover as well.
The account options button is now a `<button>` rather than a `<i>`.
This required a few additional style rules to overrule the default
button styles. Additionally the size was increased so that it matches
the designs more closely.
The callbacks for connecting, disconnecting, and switching accounts
have been updated to use state and props to determine the correct
address to use, rather than being bound to the correct address
parameter in the render function. This means we aren't creating a new
function upon each render anymore.
The `showAccountOptions` method still needs to be bound once per
account, but this was switched to use more readable syntax (`.bind`,
instead of the double arrow function).
`react-popper` and `@popperjs/core` were both added as dependencies.
These should be used for any UI requiring relative positioning (e.g.
tooltips, menus, etc.). Older versions of these libraries are already
in our codebase as transitive dependencies of the tooltip library we're
using.
2020-05-18 19:51:29 +02:00
|
|
|
&__button {
|
2020-10-29 16:03:29 +01:00
|
|
|
font-size: $font-size-h4;
|
Improve account options menu (#8607)
The account options menu is now much faster, and it correctly closes
when 'Switch account' is selected.
A static width had to be set on the menu so that it could be positioned
reliably. Without this width set, it was rendered as a different size
before positioning than after, which resulted in it being positioned
incorrectly. A `z-index` had to be added (equal to the `z-index` used
by the popover component) to ensure it wasn't rendered beneath the
popover.
The menu is automatically positioned relative to the account options
button, appearing below the button by default but above it instead if
there isn't room below. It is positioned to be inside the bounds of the
popover as well.
The account options button is now a `<button>` rather than a `<i>`.
This required a few additional style rules to overrule the default
button styles. Additionally the size was increased so that it matches
the designs more closely.
The callbacks for connecting, disconnecting, and switching accounts
have been updated to use state and props to determine the correct
address to use, rather than being bound to the correct address
parameter in the render function. This means we aren't creating a new
function upon each render anymore.
The `showAccountOptions` method still needs to be bound once per
account, but this was switched to use more readable syntax (`.bind`,
instead of the double arrow function).
`react-popper` and `@popperjs/core` were both added as dependencies.
These should be used for any UI requiring relative positioning (e.g.
tooltips, menus, etc.). Older versions of these libraries are already
in our codebase as transitive dependencies of the tooltip library we're
using.
2020-05-18 19:51:29 +02:00
|
|
|
background: inherit;
|
2022-03-16 15:49:25 +01:00
|
|
|
color: var(--color-icon-default);
|
Improve account options menu (#8607)
The account options menu is now much faster, and it correctly closes
when 'Switch account' is selected.
A static width had to be set on the menu so that it could be positioned
reliably. Without this width set, it was rendered as a different size
before positioning than after, which resulted in it being positioned
incorrectly. A `z-index` had to be added (equal to the `z-index` used
by the popover component) to ensure it wasn't rendered beneath the
popover.
The menu is automatically positioned relative to the account options
button, appearing below the button by default but above it instead if
there isn't room below. It is positioned to be inside the bounds of the
popover as well.
The account options button is now a `<button>` rather than a `<i>`.
This required a few additional style rules to overrule the default
button styles. Additionally the size was increased so that it matches
the designs more closely.
The callbacks for connecting, disconnecting, and switching accounts
have been updated to use state and props to determine the correct
address to use, rather than being bound to the correct address
parameter in the render function. This means we aren't creating a new
function upon each render anymore.
The `showAccountOptions` method still needs to be bound once per
account, but this was switched to use more readable syntax (`.bind`,
instead of the double arrow function).
`react-popper` and `@popperjs/core` were both added as dependencies.
These should be used for any UI requiring relative positioning (e.g.
tooltips, menus, etc.). Older versions of these libraries are already
in our codebase as transitive dependencies of the tooltip library we're
using.
2020-05-18 19:51:29 +02:00
|
|
|
}
|
2020-05-15 20:53:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.tippy-tooltip.none-theme {
|
|
|
|
background: none;
|
|
|
|
padding: 0;
|
|
|
|
}
|