@salla.sa/twilight-components
Version:
Salla Web Component
52 lines (48 loc) • 2.46 kB
JavaScript
/*!
* Crafted with ❤ by Salla
*/
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
const sallaListTileCss = "";
const SallaListTile = /*@__PURE__*/ proxyCustomElement(class SallaListTile extends HTMLElement {
constructor() {
super();
this.__registerHost();
/**
* Designates the component as anchor and applies the `href` attribute.
*/
this.href = undefined;
/**
* Designates the target attribute. This should only be applied when using the `href` prop.
*/
this.target = "_self";
}
generateClass() {
return {
"s-list-tile-item": true,
"s-list-tile-item-href": !!this.href
};
}
render() {
return (h(Host, { key: 'ae953ec0fc15f697f830dc9542a1c4a861bc8f82' }, h("a", { key: '9a49318ef335e13a762ce6179ab4aa5df7a08876', class: this.generateClass(), href: this.href, target: this.target }, h("div", { key: '120f667c5b4e275afb1e494d5faef09882afd918', class: "s-list-tile-item-icon" }, h("slot", { key: '35cc900e850702bb153ed30e7d4b3d0ee560016b', name: 'icon' })), h("div", { key: '9e2c2bba573f4782f67e875a3e0ebec3f57b9207', class: "s-list-tile-item-content" }, h("div", { key: '5c02e2355172a475291c42faf5bfdf2dce7d36be', class: "s-list-tile-item-title" }, h("slot", { key: '622075b1245b8afe52bd50539fe3d0ec5dfc3869', name: 'title' })), h("div", { key: '4bef105bcb3171e3b59e4d81db5605e06a08b7e1', class: "s-list-tile-item-subtitle" }, h("slot", { key: 'e9893b4967364b006105b788d1f81dbb71971495', name: "subtitle" }))), h("div", { key: '9c4e72e82af93219d26a4e08274394ee428d55a8', class: "s-list-tile-item-action" }, h("slot", { key: 'e2f54d79037820c10657f37e2c30619a39bd056b', name: 'action' })))));
}
static get style() { return sallaListTileCss; }
}, [4, "salla-list-tile", {
"href": [1],
"target": [1]
}]);
function defineCustomElement() {
if (typeof customElements === "undefined") {
return;
}
const components = ["salla-list-tile"];
components.forEach(tagName => { switch (tagName) {
case "salla-list-tile":
if (!customElements.get(tagName)) {
customElements.define(tagName, SallaListTile);
}
break;
} });
}
export { SallaListTile as S, defineCustomElement as d };
//# sourceMappingURL=salla-list-tile2.js.map
//# sourceMappingURL=salla-list-tile2.js.map