mirror of
https://github.com/trezor/trezor-wallet
synced 2025-07-05 14:22:35 +00:00
Apply button's icon margin only when button contains text
This commit is contained in:
parent
c32c30fa8c
commit
325b5bee63
@ -109,7 +109,7 @@ const Wrapper = styled.button`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const IconWrapper = styled.span`
|
const IconWrapper = styled.span`
|
||||||
margin-right: 8px;
|
${props => (props.hasText ? 'margin-right: 8px;' : '')};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Button = ({
|
const Button = ({
|
||||||
@ -126,7 +126,9 @@ const Button = ({
|
|||||||
isTransparent={isTransparent}
|
isTransparent={isTransparent}
|
||||||
>
|
>
|
||||||
{icon && (
|
{icon && (
|
||||||
<IconWrapper>
|
<IconWrapper
|
||||||
|
hasText={!!text}
|
||||||
|
>
|
||||||
<Icon
|
<Icon
|
||||||
icon={icon.type}
|
icon={icon.type}
|
||||||
color={icon.color}
|
color={icon.color}
|
||||||
|
Loading…
Reference in New Issue
Block a user