mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
Center account selection dropdown and specify useCssTransition prop
This commit is contained in:
parent
f2f2d35992
commit
1743ccbdb5
@ -64,16 +64,16 @@ class AccountDropdowns extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderAccountSelector () {
|
renderAccountSelector () {
|
||||||
const { actions, dropdownWrapperStyle } = this.props
|
const { actions, dropdownWrapperStyle, useCssTransition } = this.props
|
||||||
const { accountSelectorActive, menuItemStyles } = this.state
|
const { accountSelectorActive, menuItemStyles } = this.state
|
||||||
|
|
||||||
return h(
|
return h(
|
||||||
Dropdown,
|
Dropdown,
|
||||||
{
|
{
|
||||||
useCssTransition: true, // Hardcoded because account selector is temporarily in app-header
|
useCssTransition,
|
||||||
style: {
|
style: {
|
||||||
marginLeft: '-238px',
|
marginLeft: '-185px',
|
||||||
marginTop: '38px',
|
marginTop: '50px',
|
||||||
minWidth: '180px',
|
minWidth: '180px',
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
maxHeight: '300px',
|
maxHeight: '300px',
|
||||||
@ -150,12 +150,13 @@ class AccountDropdowns extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderAccountOptions () {
|
renderAccountOptions () {
|
||||||
const { actions, dropdownWrapperStyle } = this.props
|
const { actions, dropdownWrapperStyle, useCssTransition } = this.props
|
||||||
const { optionsMenuActive, menuItemStyles } = this.state
|
const { optionsMenuActive, menuItemStyles } = this.state
|
||||||
|
|
||||||
return h(
|
return h(
|
||||||
Dropdown,
|
Dropdown,
|
||||||
{
|
{
|
||||||
|
useCssTransition,
|
||||||
style: Object.assign(
|
style: Object.assign(
|
||||||
{
|
{
|
||||||
marginLeft: '-10px',
|
marginLeft: '-10px',
|
||||||
|
@ -72,6 +72,7 @@ WalletView.prototype.render = function () {
|
|||||||
selected: selectedAddress,
|
selected: selectedAddress,
|
||||||
network,
|
network,
|
||||||
identities,
|
identities,
|
||||||
|
useCssTransition: true,
|
||||||
enableAccountOptions: true,
|
enableAccountOptions: true,
|
||||||
dropdownWrapperStyle: {
|
dropdownWrapperStyle: {
|
||||||
padding: '1px 15px',
|
padding: '1px 15px',
|
||||||
@ -100,6 +101,7 @@ WalletView.prototype.render = function () {
|
|||||||
left: 'calc(50% + 28px + 5.5px)',
|
left: 'calc(50% + 28px + 5.5px)',
|
||||||
top: '14px',
|
top: '14px',
|
||||||
},
|
},
|
||||||
|
useCssTransition: true,
|
||||||
selected: selectedAddress,
|
selected: selectedAddress,
|
||||||
network,
|
network,
|
||||||
identities,
|
identities,
|
||||||
|
Loading…
Reference in New Issue
Block a user