UNPKG

sparnatural

Version:

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

20 lines (17 loc) 536 B
import HTMLComponent from "../HtmlComponent"; import UiuxConfig from "../IconsConstants"; class UnselectBtn extends HTMLComponent { constructor(ParentComponent: HTMLComponent, callBack: () => void) { let widgetHtml = $(`<span>${UiuxConfig.ICON_REG_XMARK}</span>`); super("unselect", ParentComponent, widgetHtml); // add clicklistener this.widgetHtml.on("click", function (e: JQuery.ClickEvent) { callBack(); }); } render(): this { super.render(); return this; } } export default UnselectBtn;