1 | import { __decorate } from "tslib";
|
2 | import { LitElement, html, css } from "lit";
|
3 | import { property } from "lit/decorators.js";
|
4 | import "../components/ew-circular-progress";
|
5 | class 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 | }
|
22 | EwtPageProgress.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);
|
38 | customElements.define("ewt-page-progress", EwtPageProgress);
|
39 |
|
\ | No newline at end of file |