refactor(static): refactor static module

This commit is contained in:
2026-07-22 22:15:08 +03:00
parent 72fd148a54
commit 6171ec8a26
14 changed files with 78 additions and 79 deletions
+17
View File
@@ -0,0 +1,17 @@
class AppLinkElement extends HTMLElement {
static observedAttributes = ["icon", "href", "target"];
constructor() {
super();
this.innerHTML = `
<a href="${this.getAttribute("href")}" target="${this.getAttribute("target") || ""}"
class="d-flex align-items-center text-body text-decoration-none">
<span class="fs-4">
<span class="bi bi-${this.getAttribute("icon")} me-1"></span>
<span>${this.textContent}</span>
</span>
</a>`;
}
}
customElements.define("app-link", AppLinkElement);