mapcomplete/UI/Image/SimpleImageElement.ts

15 lines
333 B
TypeScript
Raw Normal View History

2020-06-24 00:35:19 +02:00
import {UIElement} from "../UIElement";
import {UIEventSource} from "../../Logic/UIEventSource";
2020-06-24 00:35:19 +02:00
export class SimpleImageElement extends UIElement {
constructor(source: UIEventSource<string>) {
super(source);
}
InnerRender(): string {
2020-06-24 00:35:19 +02:00
return "<img src='" + this._source.data + "' alt='img'>";
}
}