feat(schedule): add schedule categorie icons
test / test (push) Successful in 56s

This commit is contained in:
2026-10-05 20:46:04 +03:00
parent f9e810049d
commit 0946aacc3f
25 changed files with 118 additions and 8 deletions
@@ -0,0 +1,19 @@
export class ScheduleIconElement extends HTMLElement {
static iconsPath = "./icons";
static observedAttributes = ["icon"];
constructor() {
super();
const icon = this.getAttribute("icon");
if (icon) {
this.icon = icon;
}
}
set icon(value: string) {
const src = `${ScheduleIconElement.iconsPath}/${value}.svg`;
fetch(src)
.then((response) => (response.ok ? response.text() : ""))
.then((data) => (this.innerHTML = data));
}
}