Started adding buttons

This commit is contained in:
Pax1601
2023-01-19 22:48:51 +01:00
parent 1be876fb83
commit 6655739957
13 changed files with 113 additions and 36 deletions

View File

@@ -0,0 +1,14 @@
export class Button
{
#container: HTMLElement | null;
constructor(ID: string, srcs: string[], callback: CallableFunction)
{
this.#container = document.getElementById(ID);
if (this.#container != null)
{
var img = document.createElement("img");
img.src = srcs[0];
this.#container.appendChild(img);
}
}
}