sparnatural
Version:
Visual client-side SPARQL query builder and knowledge graph exploration tool
16 lines • 1.1 kB
JavaScript
import { HTMLComponent } from "../HtmlComponent";
export class EditBtn extends HTMLComponent {
constructor(ParentComponent, callBack) {
let widgetHtml = $(`<span>${"<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--!Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2024 Fonticons, Inc.--><path d=\"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM357.8 139.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-21.4 21.4-71-71 21.4-21.4c15.6-15.6 40.9-15.6 56.6 0zM151.9 289L257.1 183.8l71 71L222.9 359.9c-4.1 4.1-9.2 7-14.9 8.4l-60.1 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.1c1.4-5.6 4.3-10.8 8.4-14.9z\"/></svg>" /* UiuxConfig.ICON_PEN */}</span>`);
super("edit", ParentComponent, widgetHtml);
// add clicklistener
this.widgetHtml.on("click", function (e) {
callBack();
});
}
render() {
super.render();
return this;
}
}
//# sourceMappingURL=EditBtn.js.map