mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-29 02:18:06 +00:00
follow design guidelines
This commit is contained in:
parent
298bcdf546
commit
21c67c060e
@ -3,6 +3,7 @@ import styled from 'styled-components';
|
|||||||
import ColorHash from 'color-hash';
|
import ColorHash from 'color-hash';
|
||||||
import ScaleText from 'react-scale-text';
|
import ScaleText from 'react-scale-text';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
import { FONT_WEIGHT } from 'config/variables';
|
||||||
import Button from 'components/Button';
|
import Button from 'components/Button';
|
||||||
import Icon from 'components/Icon';
|
import Icon from 'components/Icon';
|
||||||
import ICONS from 'config/icons';
|
import ICONS from 'config/icons';
|
||||||
@ -39,12 +40,26 @@ const P = styled.p`
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const TokenName = styled.div`
|
const TokenText = styled.div`
|
||||||
flex: 1;
|
font-weight: ${FONT_WEIGHT.MEDIUM};
|
||||||
color: ${colors.TEXT_SECONDARY};
|
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)`
|
const RemoveTokenButton = styled(Button)`
|
||||||
padding: 0 0 0 10px;
|
padding: 0 0 0 10px;
|
||||||
@ -73,7 +88,8 @@ class AddedToken extends PureComponent {
|
|||||||
</TokenIcon>
|
</TokenIcon>
|
||||||
|
|
||||||
<TokenName>{this.props.token.name}</TokenName>
|
<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> {this.props.token.symbol}</TokenSymbol>
|
||||||
<RemoveTokenButton
|
<RemoveTokenButton
|
||||||
isTransparent
|
isTransparent
|
||||||
onClick={() => this.props.removeToken(this.props.token)}
|
onClick={() => this.props.removeToken(this.props.token)}
|
||||||
|
Loading…
Reference in New Issue
Block a user