UNPKG

@hyperlane-xyz/widgets

Version:

Common react components for Hyperlane projects

21 lines 846 B
import React from 'react'; import { WalletIcon } from '../icons/Wallet.js'; import { BinanceLogo } from '../logos/Binance.js'; import { WalletConnectLogo } from '../logos/WalletConnect.js'; export function WalletLogo({ walletDetails, size, }) { const src = walletDetails.logoUrl?.trim(); const name = walletDetails.name?.toLowerCase(); if (src) { return React.createElement("img", { src: src, width: size, height: size }); } else if (name === 'walletconnect') { return React.createElement(WalletConnectLogo, { width: size, height: size }); } else if (name === 'binance wallet') { return React.createElement(BinanceLogo, { width: size, height: size }); } else { return React.createElement(WalletIcon, { width: size, height: size }); } } //# sourceMappingURL=WalletLogo.js.map