mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-28 03:08:30 +00:00
added prop to enable rendering Logo without wrapper
This commit is contained in:
parent
800a5be990
commit
597f804a9d
@ -28,13 +28,23 @@ class CoinLogo extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { network, className } = this.props;
|
const { network, className, standalone } = this.props;
|
||||||
|
|
||||||
|
const logo = (
|
||||||
|
<Logo
|
||||||
|
className={className}
|
||||||
|
hasLongIcon={this.hasLongIcon(network)}
|
||||||
|
src={require(`./images/${network}.png`)} // eslint-disable-line
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
|
if (standalone) {
|
||||||
|
return logo;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Wrapper className={className}>
|
<Wrapper className={className}>
|
||||||
<Logo
|
{logo}
|
||||||
hasLongIcon={this.hasLongIcon(network)}
|
|
||||||
src={require(`./images/${network}.png`)} // eslint-disable-line
|
|
||||||
/>
|
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -43,6 +53,7 @@ class CoinLogo extends PureComponent {
|
|||||||
CoinLogo.propTypes = {
|
CoinLogo.propTypes = {
|
||||||
network: PropTypes.string,
|
network: PropTypes.string,
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
|
standalone: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default CoinLogo;
|
export default CoinLogo;
|
||||||
|
Loading…
Reference in New Issue
Block a user