@salla.sa/twilight-components
Version:
Salla Web Component
60 lines (56 loc) • 1.73 kB
JavaScript
/*!
* Crafted with ❤ by Salla
*/
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
const sallaTabContentCss = "";
const SallaTabContent = /*@__PURE__*/ proxyCustomElement(class SallaTabContent extends HTMLElement {
constructor() {
super();
this.__registerHost();
this.isSelected = false;
}
/**
* Expose self for the parent.
*/
async getChild() {
return {
selected: this.selected.bind(this),
unselect: this.unselect.bind(this),
name: this.name
};
}
unselect() {
this.isSelected = false;
}
selected() {
this.isSelected = true;
}
render() {
const classes = {
's-tabs-content': true,
's-tabs-content-selected': this.isSelected
};
return (h("div", { key: '0092c3241354f38472c4e2bbf3d135c45a95cd32', class: classes }, h("slot", { key: '029ea528ae14e7f74323f622a146926ca49fa5c4' })));
}
static get style() { return sallaTabContentCss; }
}, [4, "salla-tab-content", {
"name": [1],
"isSelected": [32],
"getChild": [64]
}]);
function defineCustomElement() {
if (typeof customElements === "undefined") {
return;
}
const components = ["salla-tab-content"];
components.forEach(tagName => { switch (tagName) {
case "salla-tab-content":
if (!customElements.get(tagName)) {
customElements.define(tagName, SallaTabContent);
}
break;
} });
}
export { SallaTabContent as S, defineCustomElement as d };
//# sourceMappingURL=salla-tab-content2.js.map
//# sourceMappingURL=salla-tab-content2.js.map