UNPKG

sparnatural

Version:

Visual client-side SPARQL query builder and knowledge graph exploration tool

18 lines 569 B
import { HTMLComponent } from "../HtmlComponent"; export class AddUserInputBtn extends HTMLComponent { constructor(parentComponent, btnText, callBack) { let widgetHtml = $(`<button class="button-add"> ${btnText} </button>`); super("AddUserInputBtn", parentComponent, widgetHtml); this.callBack = callBack; } render() { super.render(); this.widgetHtml[0].addEventListener("click", () => { this.callBack(); }); return this; } } //# sourceMappingURL=AddUserInputBtn.js.map