ion-thumbnail.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*!
  2. * (C) Ionic http://ionicframework.com - MIT License
  3. */
  4. import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
  5. import { b as getIonMode } from './ionic-global.js';
  6. const 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}";
  7. const IonThumbnailStyle0 = thumbnailCss;
  8. const Thumbnail = /*@__PURE__*/ proxyCustomElement(class Thumbnail extends HTMLElement {
  9. constructor() {
  10. super();
  11. this.__registerHost();
  12. this.__attachShadow();
  13. }
  14. render() {
  15. return (h(Host, { key: '7f5fd6c056da2d82feb2c3c33f3e6dec898787f5', class: getIonMode(this) }, h("slot", { key: 'd15fd2b6cdc03777edc1930be95ad838e1b376c8' })));
  16. }
  17. static get style() { return IonThumbnailStyle0; }
  18. }, [1, "ion-thumbnail"]);
  19. function defineCustomElement$1() {
  20. if (typeof customElements === "undefined") {
  21. return;
  22. }
  23. const components = ["ion-thumbnail"];
  24. components.forEach(tagName => { switch (tagName) {
  25. case "ion-thumbnail":
  26. if (!customElements.get(tagName)) {
  27. customElements.define(tagName, Thumbnail);
  28. }
  29. break;
  30. } });
  31. }
  32. const IonThumbnail = Thumbnail;
  33. const defineCustomElement = defineCustomElement$1;
  34. export { IonThumbnail, defineCustomElement };