mapcomplete/UI/Base/Image.ts

20 lines
450 B
TypeScript
Raw Normal View History

2020-07-31 04:58:58 +02:00
import {UIElement} from "../UIElement";
export class Image extends UIElement{
private src: string;
private style: string = "";
constructor(src: string, style: string = "") {
super(undefined);
this.style = style;
this.src = src;
}
InnerRender(): string {
if(this.src === undefined){
return "";
}
return `<img src='${this.src}' style='${this.style}'>`;
}
}