forked from MapComplete/MapComplete
Add custom theme for advanced users
This commit is contained in:
parent
004eead4ee
commit
9c42839f01
44 changed files with 635 additions and 326 deletions
20
UI/Base/Image.ts
Normal file
20
UI/Base/Image.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
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}'>`;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue