From f9432c59826d95dbdaf70a3da4a8a453137efb11 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Thu, 10 Aug 2017 19:55:01 -0700 Subject: Move Txs list item styles into classes --- ui/app/components/tx-list.js | 54 +++++++---------------- ui/app/css/itcss/components/transaction-list.scss | 44 ++++++++++++++++++ 2 files changed, 61 insertions(+), 37 deletions(-) create mode 100644 ui/app/css/itcss/components/transaction-list.scss diff --git a/ui/app/components/tx-list.js b/ui/app/components/tx-list.js index 368854786..57d7af4f1 100644 --- a/ui/app/components/tx-list.js +++ b/ui/app/components/tx-list.js @@ -111,69 +111,49 @@ TxList.prototype.renderTransactionListItem = function () { const { address, transactionStatus, transactionAmount, dateString } = props - return h('div.flex-column', { - style: { - alignItems: 'stretch', - justifyContent: 'flex-start', - margin: '0.6em 1.3em 0.6em 1.3em', - overflow: 'none' - } + return h('div.flex-column.tx-list-item-wrapper', { + style: {} }, [ - h('div', { - style: { - flexGrow: 1, - flexShrink: 1, - flexBasis: 'auto', - marginTop: '0.3em', - } + h('div.tx-list-date-wrapper', { + style: {} }, [ - h('span', {}, [ + h('span.tx-list-date', {}, [ dateString, ]) ]), - h('div.flex-row', { - style: { - alignItems: 'stretch', - } + h('div.flex-row.tx-list-content-wrapper', { + style: {} }, [ - h('div', { - style: { - flexGrow: 1, - } + h('div.tx-list-identicon-wrapper', { + style: {} }, [ h(Identicon, { address, - diameter: 24, + diameter: 18, }) ]), - h('div', { - style: { - flexGrow: 3, - } + h('div.tx-list-account-wrapper', { + style: {} }, [ h('span', {}, [ '0x82df11be...7684', //address ]), ]), - h('div', { - style: { - flexGrow: 5, - } + h('div.tx-list-status-wrapper', { + style: {} }, [ - h('span', {}, [ + h('span.tx-list-status', {}, [ transactionStatus, ]), ]), - h('div.flex-column', { - style: { - flexGrow: 2, - } + h('div.flex-column.tx-list-details-wrapper', { + style: {} }, [ h('span', {}, [ diff --git a/ui/app/css/itcss/components/transaction-list.scss b/ui/app/css/itcss/components/transaction-list.scss new file mode 100644 index 000000000..ff482fd4a --- /dev/null +++ b/ui/app/css/itcss/components/transaction-list.scss @@ -0,0 +1,44 @@ +.tx-list-item-wrapper { + align-items: stretch; + justify-content: 'flex-start', + margin: '0.6em 1.3em 0.6em 1.3em', + overflow: 'scroll', +} + +.tx-list-date-wrapper { + flex-grow: 1; + flex-shrink: 1; + flex-basis: 'auto'; + margin-top: '0.3em'; +} + +.tx-list-content-wrapper { + alignItems: 'stretch'; +} + +.tx-list-date { + color: $dusty-gray; + font-size: 8px; +} + +.tx-list-identicon-wrapper { + flex: 1 1 auto; +} + +.tx-list-account-wrapper { + flex: 3 3 auto; + font-size: 12px; +} + +.tx-list-status-wrapper { + flex: 5 5 auto; +} + +.tx-list-status { + color: $dusty-gray; + font-size: 12px; +} + +.tx-list-details-wrapper { + flex: 2 2 auto; +} \ No newline at end of file -- cgit