1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-28 09:58:23 +00:00

follow design guidelines

This commit is contained in:
slowbackspace 2019-01-10 18:30:10 +01:00
parent 298bcdf546
commit 21c67c060e

View File

@ -3,6 +3,7 @@ import styled from 'styled-components';
import ColorHash from 'color-hash';
import ScaleText from 'react-scale-text';
import colors from 'config/colors';
import { FONT_WEIGHT } from 'config/variables';
import Button from 'components/Button';
import Icon from 'components/Icon';
import ICONS from 'config/icons';
@ -39,12 +40,26 @@ const P = styled.p`
color: inherit;
`;
const TokenName = styled.div`
flex: 1;
const TokenText = styled.div`
font-weight: ${FONT_WEIGHT.MEDIUM};
color: ${colors.TEXT_SECONDARY};
`;
const TokenBalance = styled.div``;
const TokenName = styled(TokenText)`
flex: 0 0 0;
padding-right: 5px;
`;
const TokenSymbol = styled(TokenText)`
flex: 0 0 0;
`;
const TokenBalance = styled(TokenText)`
flex: 1 0 0;
overflow: hidden;
text-overflow: ellipsis;
text-align: right;
`;
const RemoveTokenButton = styled(Button)`
padding: 0 0 0 10px;
@ -73,7 +88,8 @@ class AddedToken extends PureComponent {
</TokenIcon>
<TokenName>{this.props.token.name}</TokenName>
<TokenBalance>{this.getTokenBalance(this.props.token)} {this.props.token.symbol}</TokenBalance>
<TokenBalance>{this.getTokenBalance(this.props.token)}</TokenBalance>
<TokenSymbol>&nbsp;{this.props.token.symbol}</TokenSymbol>
<RemoveTokenButton
isTransparent
onClick={() => this.props.removeToken(this.props.token)}