Add sublte-button, add different icon for popout
This commit is contained in:
parent
7882747424
commit
497d5c1b49
5 changed files with 63 additions and 20 deletions
27
UI/Base/SubtleButton.ts
Normal file
27
UI/Base/SubtleButton.ts
Normal 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue