UNPKG

radh-ui

Version:

Stencil Component Starter

24 lines (20 loc) 883 B
import { r as registerInstance, h, H as Host, g as getElement } from './index-a9700b09.js'; const indexPageCss = ":host{display:block;--ws-check-button-width:50%;--ws-check-button-selected-border:solid 3px blue}"; class IndexPage { constructor(hostRef) { 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 (h(Host, null, h("cjs-child", { messageFromFather: "I am your father" }), h("p", null, "Message from child: ", this.messageFromChild), h("button", { onClick: this.tomaPaga }, "Toma paga"))); } get element() { return getElement(this); } } IndexPage.style = indexPageCss; export { IndexPage as index_page };