2021-06-28 18:06:54 +02:00
|
|
|
import {FixedUiElement} from "./FixedUiElement";
|
2021-10-02 17:57:54 +02:00
|
|
|
import {Translation} from "../i18n/Translation";
|
|
|
|
import Combine from "./Combine";
|
|
|
|
import Svg from "../../Svg";
|
|
|
|
import Translations from "../i18n/Translations";
|
2021-06-28 18:06:54 +02:00
|
|
|
|
2021-10-02 17:57:54 +02:00
|
|
|
export default class Loading extends Combine {
|
|
|
|
constructor(msg?: Translation | string) {
|
|
|
|
const t = Translations.T(msg ) ?? Translations.t.general.loading.Clone();
|
|
|
|
t.SetClass("pl-2")
|
|
|
|
super([
|
|
|
|
Svg.loading_svg().SetClass("animate-spin").SetStyle("width: 1.5rem; height: 1.5rem; margin-bottom: 4px;"),
|
|
|
|
t
|
|
|
|
])
|
|
|
|
this.SetClass("flex m-1")
|
2021-06-28 18:06:54 +02:00
|
|
|
}
|
|
|
|
}
|