mapcomplete/UI/Image/SimpleImageElement.ts

15 lines
334 B
TypeScript
Raw Normal View History

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