UNPKG

@reown/appkit-ui

Version:

The full stack toolkit to build onchain app UX.

45 lines 2.02 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import { LitElement, html } from 'lit'; import { property } from 'lit/decorators.js'; import { ifDefined } from 'lit/directives/if-defined.js'; import { resetStyles } from '../../utils/ThemeUtil.js'; import { customElement } from '../../utils/WebComponentsUtil.js'; import '../wui-icon-box/index.js'; import '../wui-wallet-image/index.js'; import styles from './styles.js'; const TOTAL_IMAGES = 4; let WuiAllWalletsImage = class WuiAllWalletsImage extends LitElement { constructor() { super(...arguments); this.walletImages = []; } render() { const isPlaceholders = this.walletImages.length < TOTAL_IMAGES; return html `${this.walletImages .slice(0, TOTAL_IMAGES) .map(({ src, walletName }) => html ` <wui-wallet-image size="sm" imageSrc=${src} name=${ifDefined(walletName)} ></wui-wallet-image> `)} ${isPlaceholders ? [...Array(TOTAL_IMAGES - this.walletImages.length)].map(() => html ` <wui-wallet-image size="sm" name=""></wui-wallet-image>`) : null} `; } }; WuiAllWalletsImage.styles = [resetStyles, styles]; __decorate([ property({ type: Array }) ], WuiAllWalletsImage.prototype, "walletImages", void 0); WuiAllWalletsImage = __decorate([ customElement('wui-all-wallets-image') ], WuiAllWalletsImage); export { WuiAllWalletsImage }; //# sourceMappingURL=index.js.map