Add sublte-button, add different icon for popout

This commit is contained in:
Pieter Vander Vennet 2020-07-29 16:46:45 +02:00
parent 7882747424
commit 497d5c1b49
5 changed files with 63 additions and 20 deletions

27
UI/Base/SubtleButton.ts Normal file
View file

@ -0,0 +1,27 @@
import {UIElement} from "../UIElement";
import Translations from "../i18n/Translations";
import Combine from "./Combine";
export class SubtleButton extends UIElement{
private imageUrl: string;
private message: UIElement;
constructor(imageUrl: string, message: string | UIElement) {
super(undefined);
this.message = Translations.W(message);
this.imageUrl = imageUrl;
}
InnerRender(): string {
return new Combine([
'<span class="subtle-button">',
`<img src='${this.imageUrl}'>`,
this.message,
'</span>'
]).Render();
}
}