1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-27 18:58:08 +00:00

Merge pull request #326 from trezor/fix/token-icons-color

Fix tokens list
This commit is contained in:
Vladimir Volek 2019-01-11 16:27:28 +01:00 committed by GitHub
commit e24574d70b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,21 @@ 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 TokenBalance = styled(TokenText)`
flex: 1 0 0;
word-break: break-all;
text-align: right;
`;
const RemoveTokenButton = styled(Button)` const RemoveTokenButton = styled(Button)`
padding: 0 0 0 10px; padding: 0 0 0 10px;
@ -58,8 +68,8 @@ class AddedToken extends PureComponent {
} }
render() { render() {
const bgColor = new ColorHash({ lightness: 0.16 }); const bgColor = new ColorHash({ lightness: 0.9 });
const textColor = new ColorHash(); const textColor = new ColorHash({ lightness: 0.3, saturation: 1 });
return ( return (
<TokenWrapper key={this.props.token.symbol}> <TokenWrapper key={this.props.token.symbol}>