From 56a14f0aa7b70db2e654251ae32d07051e7c6add Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Sat, 16 Mar 2019 17:00:28 +0100 Subject: [PATCH] same height icons, center with flexbox --- src/components/images/CoinLogo/index.js | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/components/images/CoinLogo/index.js b/src/components/images/CoinLogo/index.js index 9a93522e..8816a799 100644 --- a/src/components/images/CoinLogo/index.js +++ b/src/components/images/CoinLogo/index.js @@ -5,35 +5,22 @@ import PropTypes from 'prop-types'; const Wrapper = styled.div` padding-right: 20px; width: 40px; + display: flex; + justify-content: center; `; const Logo = styled.img` - width: ${props => (props.hasLongIcon ? '15px' : '23px')}; - margin-left: ${props => (props.hasLongIcon ? '3px' : '0px')}; + height: 23px; display: block; `; 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() { const { network, className, standalone } = this.props; const logo = ( );