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() {
|
||||
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 (
|
||||
<Wrapper className={className}>
|
||||
<Logo
|
||||
hasLongIcon={this.hasLongIcon(network)}
|
||||
src={require(`./images/${network}.png`)} // eslint-disable-line
|
||||
/>
|
||||
{logo}
|
||||
</Wrapper>
|
||||
);
|
||||
}
|
||||
@ -43,6 +53,7 @@ class CoinLogo extends PureComponent {
|
||||
CoinLogo.propTypes = {
|
||||
network: PropTypes.string,
|
||||
className: PropTypes.string,
|
||||
standalone: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default CoinLogo;
|
||||
|
Loading…
Reference in New Issue
Block a user