phantasmal-world/src/new/core/gui/Button.ts

14 lines
294 B
TypeScript
Raw Normal View History

2019-08-20 04:56:40 +08:00
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;
}
}