mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-05 23:38:30 +08:00
14 lines
294 B
TypeScript
14 lines
294 B
TypeScript
![]() |
import { create_el } from "./dom";
|
||
|
import { View } from "./View";
|
||
|
import "./Button.css";
|
||
|
|
||
|
export class Button extends View {
|
||
|
element: HTMLButtonElement = create_el("button", "core_Button");
|
||
|
|
||
|
constructor(text: string) {
|
||
|
super();
|
||
|
|
||
|
this.element.textContent = text;
|
||
|
}
|
||
|
}
|