UNPKG

@larva.io/webcomponents

Version:

Fentrica SmartUnits WebComponents package

114 lines (113 loc) 3.67 kB
/*! * (C) Fentrica http://fentrica.com - Seee LICENSE.md */ import { h, Host } from "@stencil/core"; export class OnOffContent { onClick(event) { this.buttonclick.emit(); event.preventDefault(); event.stopPropagation(); } render() { const isOn = this.value === 'onoff.on' || this.value === 'onoff.switchoff'; return (h(Host, { key: 'b17474c05fb17917addf9158a7a7d070c42dc48b' }, h("div", { key: '02c454513485b04fd706f9d5cee38679a58c2c0a', class: "onoff-container" }, h("lar-toggle", { key: '200b7a21c21c7d58e462c0b727502fcf288b4f5c', disabled: this.disabled, color: this.color, checked: isOn, onClick: e => this.onClick(e) })))); } static get is() { return "lar-onoff-content"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["onoff-content.scss"] }; } static get styleUrls() { return { "$": ["onoff-content.css"] }; } static get properties() { return { "color": { "type": "string", "mutable": false, "complexType": { "original": "Color", "resolved": "string", "references": { "Color": { "location": "import", "path": "../../interface", "id": "src/interface.d.ts::Color" } } }, "required": false, "optional": true, "docs": { "tags": [], "text": "" }, "getter": false, "setter": false, "reflect": false, "attribute": "color" }, "disabled": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "" }, "getter": false, "setter": false, "reflect": false, "attribute": "disabled" }, "value": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "" }, "getter": false, "setter": false, "reflect": false, "attribute": "value" } }; } static get events() { return [{ "method": "buttonclick", "name": "buttonclick", "bubbles": true, "cancelable": true, "composed": true, "docs": { "tags": [], "text": "" }, "complexType": { "original": "any", "resolved": "any", "references": {} } }]; } } //# sourceMappingURL=onoff-content.js.map