-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprogress-bar.js
44 lines (36 loc) · 993 Bytes
/
progress-bar.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import {html, PolymerElement} from '@polymer/polymer/polymer-element.js';
import '@polymer/iron-icon/iron-icon';
class ProgressBar extends PolymerElement {
static get template() {
return html`<style>
.progressbar {
width: 100%;
}
.progressbar-progress {
border-radius: 5px;
display: flex;
justify-content: space-between;
position: relative;
padding: 2px 10px;
}
.start {
display: flex;
}
.label {
margin-right: 15px;
}
</style>
<div class="progressbar">
<div class="progressbar-progress" style="background: linear-gradient(to right, #24D1FF [[percent]]%, #1B8B9E 0%);">
<div class="start">
<div class="label">[[label]]</div>
<div class="value">[[value]]</div>
</div>
<div>[[description]]</div>
</div>`;
}
static get is() {
return 'progress-bar';
}
}
customElements.define(ProgressBar.is, ProgressBar);