hydrogen-web/src/platform/web/ui/general/LoadingView.js
Bruno Windels e8c20c28b2 allow passing label into LoadingView
also doesn't need to be a template view, as it doesn't have bindings
or event handlers
2022-02-10 11:06:44 +01:00

27 lines
877 B
JavaScript

/*
Copyright 2021 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import {StaticView} from "./StaticView";
import {spinner} from "../common.js";
export class LoadingView extends StaticView {
constructor(label = "Loading") {
super(label, (t, label) => {
return t.div({ className: "LoadingView" }, [spinner(t), label]);
});
}
}