mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Implement responsive wallet balances
This commit is contained in:
parent
8a39941d9a
commit
0fab1b5482
@ -6,6 +6,7 @@ const Identicon = require('./identicon')
|
|||||||
const AccountDropdowns = require('./account-dropdowns').AccountDropdowns
|
const AccountDropdowns = require('./account-dropdowns').AccountDropdowns
|
||||||
const Content = require('./wallet-content-display')
|
const Content = require('./wallet-content-display')
|
||||||
const actions = require('../actions')
|
const actions = require('../actions')
|
||||||
|
const BalanceComponent = require('./balance-component')
|
||||||
const selectors = require('../selectors')
|
const selectors = require('../selectors')
|
||||||
|
|
||||||
module.exports = connect(mapStateToProps, mapDispatchToProps)(WalletView)
|
module.exports = connect(mapStateToProps, mapDispatchToProps)(WalletView)
|
||||||
@ -113,22 +114,133 @@ WalletView.prototype.render = function () {
|
|||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
h(Content, {
|
//'Wallet' - Title
|
||||||
title: 'Wallet',
|
// Not visible on mobile
|
||||||
amount: '1001.124 ETH',
|
h('div.flex-column.wallet-view-title-wrapper', {}, [
|
||||||
fiatValue: '$300,000.00 USD',
|
h('span.wallet-view-title', {}, [
|
||||||
active: true,
|
'Wallet',
|
||||||
}),
|
])
|
||||||
|
]),
|
||||||
|
|
||||||
|
//Wallet Balances
|
||||||
|
h('div.flex-column.wallet-balance-wrapper-active', {}, [
|
||||||
|
|
||||||
|
h('div', {}, [
|
||||||
|
|
||||||
|
h('div.wallet-balance', {}, [
|
||||||
|
|
||||||
|
h(BalanceComponent, {
|
||||||
|
balanceValue: selectedAccount.balance,
|
||||||
|
style: {},
|
||||||
|
}),
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
h('div.flex-column', {}, [
|
||||||
|
|
||||||
|
h('div', {}, [
|
||||||
|
|
||||||
|
h('div.wallet-balance', {}, [
|
||||||
|
|
||||||
|
h(BalanceComponent, {
|
||||||
|
balanceValue: selectedAccount.balance,
|
||||||
|
style: {},
|
||||||
|
}),
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
h('div.flex-column', {}, [
|
||||||
|
|
||||||
|
h('div', {}, [
|
||||||
|
|
||||||
|
h('div.wallet-balance', {}, [
|
||||||
|
|
||||||
|
h(BalanceComponent, {
|
||||||
|
balanceValue: selectedAccount.balance,
|
||||||
|
style: {},
|
||||||
|
}),
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
h('div.flex-column', {}, [
|
||||||
|
|
||||||
|
h('div', {}, [
|
||||||
|
|
||||||
|
h('div.wallet-balance', {}, [
|
||||||
|
|
||||||
|
h(BalanceComponent, {
|
||||||
|
balanceValue: selectedAccount.balance,
|
||||||
|
style: {},
|
||||||
|
}),
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
h('div.flex-column', {}, [
|
||||||
|
|
||||||
|
h('div', {}, [
|
||||||
|
|
||||||
|
h('div.wallet-balance', {}, [
|
||||||
|
|
||||||
|
h(BalanceComponent, {
|
||||||
|
balanceValue: selectedAccount.balance,
|
||||||
|
style: {},
|
||||||
|
}),
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
h('div.flex-column', {}, [
|
||||||
|
|
||||||
|
h('div', {}, [
|
||||||
|
|
||||||
|
h('div.wallet-balance', {}, [
|
||||||
|
|
||||||
|
h(BalanceComponent, {
|
||||||
|
balanceValue: selectedAccount.balance,
|
||||||
|
style: {},
|
||||||
|
}),
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
h('div.flex-column', {}, [
|
||||||
|
|
||||||
|
h('div', {}, [
|
||||||
|
|
||||||
|
h('div.wallet-balance', {}, [
|
||||||
|
|
||||||
|
h(BalanceComponent, {
|
||||||
|
balanceValue: selectedAccount.balance,
|
||||||
|
style: {},
|
||||||
|
}),
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
// Wallet contents
|
|
||||||
h(Content, {
|
|
||||||
title: "Total Token Balance",
|
|
||||||
amount: "45.439 ETH",
|
|
||||||
fiatValue: "$13,000.00 USD",
|
|
||||||
active: false,
|
|
||||||
style: {
|
|
||||||
marginTop: '1.3em',
|
|
||||||
}
|
|
||||||
})
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,10 @@
|
|||||||
@import './network.scss';
|
@import './network.scss';
|
||||||
@import './modal.scss';
|
@import './modal.scss';
|
||||||
@import './newui-sections.scss';
|
@import './newui-sections.scss';
|
||||||
|
|
||||||
|
// Balances
|
||||||
@import './hero-balance.scss';
|
@import './hero-balance.scss';
|
||||||
|
@import './wallet-balance.scss';
|
||||||
|
|
||||||
@import './transaction-list.scss';
|
@import './transaction-list.scss';
|
||||||
@import './sections.scss';
|
@import './sections.scss';
|
||||||
|
@ -28,7 +28,22 @@ $wallet-view-bg: $wild-sand;
|
|||||||
|
|
||||||
.wallet-view {
|
.wallet-view {
|
||||||
flex: 33.5 0 33.5%;
|
flex: 33.5 0 33.5%;
|
||||||
background: $wallet-view-bg,
|
background: $wallet-view-bg;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-view-title-wrapper {
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-view-title {
|
||||||
|
margin-left: 15px;
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
// No title on mobile
|
||||||
|
@media screen and (max-width: 575px) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.account-options-menu {
|
.account-options-menu {
|
||||||
|
63
ui/app/css/itcss/components/wallet-balance.scss
Normal file
63
ui/app/css/itcss/components/wallet-balance.scss
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
$wallet-balance-bg: $gallery;
|
||||||
|
$wallet-balance-breakpoint: 890px;
|
||||||
|
$wallet-balance-breakpoint-range:
|
||||||
|
"screen and (min-width: #{$break-large}) and (max-width: #{$wallet-balance-breakpoint})";
|
||||||
|
|
||||||
|
.wallet-balance {
|
||||||
|
background: inherit;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.balance-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
margin: 20px 24px;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-grow: 3;
|
||||||
|
|
||||||
|
@media #{$wallet-balance-breakpoint-range} {
|
||||||
|
margin: 10% 4%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.balance-display {
|
||||||
|
margin-left: 15px;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: flex-start;
|
||||||
|
|
||||||
|
.token-amount {
|
||||||
|
font-size: 135%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fiat-amount {
|
||||||
|
margin-top: 0.25%;
|
||||||
|
font-size: 105%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media #{$wallet-balance-breakpoint-range} {
|
||||||
|
margin-left: 4%;
|
||||||
|
|
||||||
|
.token-amount {
|
||||||
|
font-size: 105%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fiat-amount {
|
||||||
|
font-size: 95%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.balance-icon {
|
||||||
|
border-radius: 25px;
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
|
border: 1px solid $alto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-balance-wrapper-active {
|
||||||
|
background: $wallet-balance-bg;
|
||||||
|
}
|
@ -18,6 +18,7 @@ $wild-sand: #F6F6F6;
|
|||||||
$white: #FFFFFF;
|
$white: #FFFFFF;
|
||||||
$dusty-gray: #9B9B9B;
|
$dusty-gray: #9B9B9B;
|
||||||
$alto: #DEDEDE;
|
$alto: #DEDEDE;
|
||||||
|
$alabaster: #FAFAFA;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Z-Indicies
|
Z-Indicies
|
||||||
|
Loading…
x
Reference in New Issue
Block a user