Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vrde committed Jul 12, 2019
1 parent 6456979 commit 95fedd2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
20 changes: 6 additions & 14 deletions src/components/Advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,13 @@ export default class Advanced extends React.Component {

return (
<div style={{marginTop:20}}>
<Flex alignItems='center' justifyContent='space-between'>
<Box py={2}>
<Text>{i18n.t('currency.label')}</Text>
</Box>
<Box py={2}>
<Select items={CURRENCY.CURRENCY_LIST} onChange={this.updateCurrency} value={currency}/>
</Box>
<Flex py='10px' alignItems='center' justifyContent='space-between'>
<Text>{i18n.t('currency.label')}</Text>
<Select items={CURRENCY.CURRENCY_LIST} onChange={this.updateCurrency} value={currency}/>
</Flex>
<Flex alignItems='center' justifyContent='space-between'>
<Box py={2}>
<Text>Enable advanced features</Text>
</Box>
<Box py={2}>
<Checkbox onChange={this.updateAdvancedBalance} checked={expertMode} />
</Box>
<Flex py='10px' alignItems='center' justifyContent='space-between'>
<Text>Enable advanced features</Text>
<Checkbox onChange={this.updateAdvancedBalance} checked={expertMode} />
</Flex>
<hr style={{paddingTop:20}}/>
<div>
Expand Down
27 changes: 16 additions & 11 deletions src/components/SimpleBalance.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { Text } from "rimble-ui";

const StyledBalance = styled.div`
text-align: center;
padding: 40px 0 20px;
padding: 20px 0;
color: var(--primary);
.otherAssets {
color: var(--dark-text);
Expand Down Expand Up @@ -50,15 +52,18 @@ export default ({ mainAmount, otherAmounts, currencyDisplay }) => {
const parts = currencyDisplay(mainAmount, true);

return (
<StyledBalance>
{parts.map(({ type, value }) => (
<Text.span className={type}>{value}</Text.span>
))}
{otherAssetsTotal > 0 && (
<Text className="otherAssets" italic fontSize={1} textAlign="center">
+{currencyDisplay(otherAssetsTotal)} in other assets
</Text>
)}
</StyledBalance>
<>
<StyledBalance>
{parts.map(({ type, value }) => (
<Text.span className={type}>{value}</Text.span>
))}
{otherAssetsTotal > 0 && (
<Text className="otherAssets" italic fontSize={1} textAlign="center">
+{currencyDisplay(otherAssetsTotal)} in other assets
</Text>
)}
</StyledBalance>
<hr />
</>
);
};

0 comments on commit 95fedd2

Please sign in to comment.