UNPKG

1.29 kBJavaScriptView Raw
1/*!
2 * (C) Ionic http://ionicframework.com - MIT License
3 */
4import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
5import { b as getIonMode } from './ionic-global.js';
6
7const thumbnailCss = ":host{--size:48px;--border-radius:0;border-radius:var(--border-radius);display:block;width:var(--size);height:var(--size)}::slotted(ion-img),::slotted(img){border-radius:var(--border-radius);width:100%;height:100%;-o-object-fit:cover;object-fit:cover;overflow:hidden}";
8
9const Thumbnail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
10 constructor() {
11 super();
12 this.__registerHost();
13 this.__attachShadow();
14 }
15 render() {
16 return (h(Host, { class: getIonMode(this) }, h("slot", null)));
17 }
18 static get style() { return thumbnailCss; }
19}, [1, "ion-thumbnail"]);
20function defineCustomElement$1() {
21 if (typeof customElements === "undefined") {
22 return;
23 }
24 const components = ["ion-thumbnail"];
25 components.forEach(tagName => { switch (tagName) {
26 case "ion-thumbnail":
27 if (!customElements.get(tagName)) {
28 customElements.define(tagName, Thumbnail);
29 }
30 break;
31 } });
32}
33
34const IonThumbnail = Thumbnail;
35const defineCustomElement = defineCustomElement$1;
36
37export { IonThumbnail, defineCustomElement };