UNPKG

@scandit/web-datacapture-barcode

Version:

Scandit Data Capture SDK for the Web

1 lines 1.17 kB
import{Color as e,ScanditIconBuilder as t,ScanditIconType as n}from"@scandit/web-datacapture-core";import{ScanditHTMLElement as r,css as i,defineCustomElements as a,html as o}from"@scandit/web-datacapture-core/build/js/private/utils/index.js";var s=class s extends r{constructor(){super();let e=this.attachShadow({mode:`open`});e.innerHTML=o`<button><slot name="icon"></slot><slot></slot></button>`,e.append(s.createStyleElement().cloneNode(!0))}async connectedCallback(){let r=await new t().withIcon(n.ChevronDown).withIconColor(e.fromHex(`#3D4852`).withAlpha(.8)).withWidth(24).withHeight(24).withIconSize(20).build();r.setAttribute(`slot`,`icon`),this.append(r)}static create(){return s.register(),document.createElement(s.tag)}static register(){a({[s.tag]:s})}static createStyleElement(){return i`:host{display:inline-block;font-family:SF Pro Text,sans-serif}:host button{align-items:center;background-color:#ffffffe6;border:none;border-radius:1rem;color:#3d4852cc;display:flex;font-size:.688rem;font-weight:600;gap:.25rem;justify-content:center;min-width:140px;min-width:100px;padding:.25rem .5rem}`}};s.tag=`scandit-find-card-list-button`;export{s as CardListButton};