scripts fixes

This commit is contained in:
OleSTEEP 2025-09-28 15:01:40 +03:00
parent 4cddc90172
commit e5932844e2
5 changed files with 13 additions and 68 deletions

View file

@ -1,34 +1,4 @@
<!-- class ImgButton {
html = undefined;
id = undefined;
constructor(name, img) {
this.html = document.createElement('div');
this.html.classList.add("imgbutton");
this.id = makeid(8);
this.html.id = this.id;
let btn_img = document.createElement('img');
btn_img.src = img;
btn_img.innerHTML = name;
this.html.appendChild(btn_img);
}
addHadler(func) {
this.html.addEventListener("click", func);
return this;
}
setCssClass(name) {
this.html.classList.add(name);
}
} -->
<script>
import { makeid } from "$lib/functions.js"
let id = makeid(8);
let { style, image, name } = $props();
</script>