UNPKG

1.04 kBJavaScriptView Raw
1import { __decorate } from "tslib";
2import { LitElement, html, css } from "lit";
3import { property } from "lit/decorators.js";
4import "../components/ew-circular-progress";
5class EwtPageProgress extends LitElement {
6 render() {
7 return html `
8 <div>
9 <ew-circular-progress
10 active
11 ?indeterminate=${this.progress === undefined}
12 .value=${this.progress !== undefined
13 ? this.progress / 100
14 : undefined}
15 ></ew-circular-progress>
16 ${this.progress !== undefined ? html `<div>${this.progress}%</div>` : ""}
17 </div>
18 ${this.label}
19 `;
20 }
21}
22EwtPageProgress.styles = css `
23 :host {
24 display: flex;
25 flex-direction: column;
26 text-align: center;
27 }
28 ew-circular-progress {
29 margin-bottom: 16px;
30 }
31 `;
32__decorate([
33 property()
34], EwtPageProgress.prototype, "label", void 0);
35__decorate([
36 property()
37], EwtPageProgress.prototype, "progress", void 0);
38customElements.define("ewt-page-progress", EwtPageProgress);
39
\No newline at end of file