mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
allow passing label into LoadingView
also doesn't need to be a template view, as it doesn't have bindings or event handlers
This commit is contained in:
parent
f12841b2d3
commit
e8c20c28b2
@ -14,11 +14,13 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {TemplateView} from "./TemplateView";
|
import {StaticView} from "./StaticView";
|
||||||
import {spinner} from "../common.js";
|
import {spinner} from "../common.js";
|
||||||
|
|
||||||
export class LoadingView extends TemplateView {
|
export class LoadingView extends StaticView {
|
||||||
render(t) {
|
constructor(label = "Loading") {
|
||||||
return t.div({ className: "LoadingView" }, [spinner(t), "Loading"]);
|
super(label, (t, label) => {
|
||||||
|
return t.div({ className: "LoadingView" }, [spinner(t), label]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user