1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-15 21:08:57 +00:00

Apply button's icon margin only when button contains text

This commit is contained in:
Vasek Mlejnsky 2018-08-30 12:16:31 +02:00
parent c32c30fa8c
commit 325b5bee63

View File

@ -109,7 +109,7 @@ const Wrapper = styled.button`
`;
const IconWrapper = styled.span`
margin-right: 8px;
${props => (props.hasText ? 'margin-right: 8px;' : '')};
`;
const Button = ({
@ -126,7 +126,9 @@ const Button = ({
isTransparent={isTransparent}
>
{icon && (
<IconWrapper>
<IconWrapper
hasText={!!text}
>
<Icon
icon={icon.type}
color={icon.color}