UNPKG

radh-ui

Version:

Stencil Component Starter

28 lines (22 loc) 954 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const index = require('./index-710e648a.js'); const indexPageCss = ":host{display:block;--ws-check-button-width:50%;--ws-check-button-selected-border:solid 3px blue}"; class IndexPage { constructor(hostRef) { index.registerInstance(this, hostRef); this.tomaPaga = async () => { const child = this.element.shadowRoot.querySelector('cjs-child'); await child.setPaga(5); }; } onReply(ev) { this.messageFromChild = ev.detail; } render() { return (index.h(index.Host, null, index.h("cjs-child", { messageFromFather: "I am your father" }), index.h("p", null, "Message from child: ", this.messageFromChild), index.h("button", { onClick: this.tomaPaga }, "Toma paga"))); } get element() { return index.getElement(this); } } IndexPage.style = indexPageCss; exports.index_page = IndexPage;