@salla.sa/twilight-components
Version:
Salla Web Component
55 lines (51 loc) • 1.73 kB
JavaScript
/*!
* Crafted with ❤ by Salla
*/
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
const sallaSkeletonCss = ":host{display:block}";
const SallaSkeleton = /*@__PURE__*/ proxyCustomElement(class SallaSkeleton extends HTMLElement {
constructor() {
super();
this.__registerHost();
/**
* Set the shape type of the skeleton is it circle or normal
*/
this.type = 'normal';
/**
* Set the skeleton width
*/
this.width = '100%';
/**
* Set the skeleton height
*/
this.height = '100%';
}
render() {
const classes = {
's-skeleton-item': true,
's-skeleton-item-circular': this.type == 'circle',
};
return (h(Host, { key: 'e3f760308bdf44e575d886c2824952d3713f59a6', class: "s-skeleton-wrapper", style: { width: this.width, height: this.height } }, h("div", { key: '3c476030834ffcffbf9bb43c6b8de25889684a18', class: classes }, "\u00A0")));
}
static get style() { return sallaSkeletonCss; }
}, [0, "salla-skeleton", {
"type": [1],
"width": [1],
"height": [1]
}]);
function defineCustomElement() {
if (typeof customElements === "undefined") {
return;
}
const components = ["salla-skeleton"];
components.forEach(tagName => { switch (tagName) {
case "salla-skeleton":
if (!customElements.get(tagName)) {
customElements.define(tagName, SallaSkeleton);
}
break;
} });
}
export { SallaSkeleton as S, defineCustomElement as d };
//# sourceMappingURL=salla-skeleton2.js.map
//# sourceMappingURL=salla-skeleton2.js.map