@larva.io/webcomponents
Version:
Fentrica SmartUnits WebComponents package
29 lines (24 loc) • 1.53 kB
JavaScript
/*!
* (C) Fentrica http://fentrica.com - Seee LICENSE.md
*/
;
var index = require('./index-B0SElCD3.js');
const onoffContentCss = "slot-fb[hidden],slot[hidden]{display:initial !important}:host{display:block;width:100%;height:100%}.onoff-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-height:15rem;padding:2rem}.onoff-container lar-toggle{-webkit-transform:scale(2.5);transform:scale(2.5)}@media (max-width: 576px){.onoff-container{min-height:12rem}.onoff-container lar-toggle{-webkit-transform:scale(2);transform:scale(2)}}";
const OnOffContent = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.buttonclick = index.createEvent(this, "buttonclick");
}
onClick(event) {
this.buttonclick.emit();
event.preventDefault();
event.stopPropagation();
}
render() {
const isOn = this.value === 'onoff.on' || this.value === 'onoff.switchoff';
return (index.h(index.Host, { key: 'b17474c05fb17917addf9158a7a7d070c42dc48b' }, index.h("div", { key: '02c454513485b04fd706f9d5cee38679a58c2c0a', class: "onoff-container" }, index.h("lar-toggle", { key: '200b7a21c21c7d58e462c0b727502fcf288b4f5c', disabled: this.disabled, color: this.color, checked: isOn, onClick: e => this.onClick(e) }))));
}
};
OnOffContent.style = onoffContentCss;
exports.lar_onoff_content = OnOffContent;
//# sourceMappingURL=lar-onoff-content.entry.cjs.js.map