mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-09 07:30:58 +00:00
Merge pull request #458 from trezor/fix/coins-menu-padding
Fix/coins menu padding
This commit is contained in:
commit
80b96224c1
@ -5,35 +5,22 @@ import PropTypes from 'prop-types';
|
|||||||
const Wrapper = styled.div`
|
const Wrapper = styled.div`
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Logo = styled.img`
|
const Logo = styled.img`
|
||||||
width: ${props => (props.hasLongIcon ? '15px' : '23px')};
|
height: 23px;
|
||||||
margin-left: ${props => (props.hasLongIcon ? '3px' : '0px')};
|
|
||||||
display: block;
|
display: block;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
class CoinLogo extends PureComponent {
|
class CoinLogo extends PureComponent {
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
this.longIcons = ['etc', 'eth', 'trop'];
|
|
||||||
}
|
|
||||||
|
|
||||||
hasLongIcon(network) {
|
|
||||||
let hasLongIcon = false;
|
|
||||||
if (this.longIcons.includes(network)) {
|
|
||||||
hasLongIcon = true;
|
|
||||||
}
|
|
||||||
return hasLongIcon;
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { network, className, standalone } = this.props;
|
const { network, className, standalone } = this.props;
|
||||||
|
|
||||||
const logo = (
|
const logo = (
|
||||||
<Logo
|
<Logo
|
||||||
className={className}
|
className={className}
|
||||||
hasLongIcon={this.hasLongIcon(network)}
|
|
||||||
src={require(`images/coins/${network}.png`)} // eslint-disable-line
|
src={require(`images/coins/${network}.png`)} // eslint-disable-line
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@ -15,7 +15,9 @@ const CoinNameWrapper = styled.div`
|
|||||||
|
|
||||||
const RowCoinWrapper = styled.div`
|
const RowCoinWrapper = styled.div`
|
||||||
padding: ${LEFT_NAVIGATION_ROW.PADDING};
|
padding: ${LEFT_NAVIGATION_ROW.PADDING};
|
||||||
height: 50px;
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
height: 44px;
|
||||||
display: block;
|
display: block;
|
||||||
font-size: ${FONT_SIZE.BIG};
|
font-size: ${FONT_SIZE.BIG};
|
||||||
color: ${colors.TEXT_PRIMARY};
|
color: ${colors.TEXT_PRIMARY};
|
||||||
|
Loading…
Reference in New Issue
Block a user