This repository has been archived on 2022-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
hydrogen-web/src/ui/web/session/room/timeline/GapView.js
Bruno Windels 8bde627cdb more WIP
2020-04-29 10:10:20 +02:00

18 lines
590 B
JavaScript

import {TemplateView} from "../../../general/TemplateView.js";
export class GapView extends TemplateView {
render(t, vm) {
const className = {
GapView: true,
isLoading: vm => vm.isLoading
};
const label = (vm.isUp ? "🠝" : "🠟") + " fill gap"; //no binding
return t.li({className}, [
t.button({
onClick: () => this.viewModel.fill(),
disabled: vm => vm.isLoading
}, label),
t.if(vm => vm.error, t.template(t => t.strong(vm => vm.error)))
]);
}
}