feat(react): basic integration for basic widget & modal

This commit is contained in:
Elian Doran
2025-08-03 13:39:23 +03:00
parent 3361a2e4ab
commit efeb9b90ca
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import { JSX, render } from "preact";
import BasicWidget from "../basic_widget.js";
export default abstract class ReactBasicWidget extends BasicWidget {
abstract get component(): JSX.Element;
doRender() {
const renderContainer = new DocumentFragment();
render(this.component, renderContainer);
this.$widget = $(renderContainer.firstChild as HTMLElement);
}
}