24 lines
619 B
JavaScript
Raw Permalink Normal View History

2026-07-07 21:52:44 +00:00
class R3bProofComponent20260707215243Component extends MatrixActorHtmlElement {
static accepts = {
setText: {},
};
static emits = { changed: {} };
constructor() {
super();
this.state = { text: "R3b Proof Component 20260707215243" };
}
render(state = this.state) {
return `<section class="component-shell"><strong>${state.text}</strong></section>`;
}
onSetText(payload = {}) {
this.state = { ...this.state, text: String(payload.text ?? "") };
this.requestRender?.();
this.emit?.("changed", { text: this.state.text });
return { ok: true, text: this.state.text };
}
}