-
Notifications
You must be signed in to change notification settings - Fork 0
/
vaadin-upload-file.js
41 lines (36 loc) · 1.3 KB
/
vaadin-upload-file.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
import { LitElement, html, css } from 'lit-element';
import { vaadinUploadFileStyles } from './vaadin-upload-file-styles.js';
class VaadinUploadFile extends LitElement {
static get properties() { return {
filename: { type: String },
status: { type: String },
value: { type: Number }
};}
constructor() {
super();
this.filename = "";
this.status = "";
this.value = 0;
}
static get styles() {
return [vaadinUploadFileStyles, css``]
}
render() {
return html`
<li>
<iron-icon id="icon" icon="lumo:checkmark"></iron-icon>
<div id="info">
<span id="filename">${this.filename}</span>
<span id="status">${this.status}</span>
<progress value="${this.value}" max="100"></progress>
</div>
<div id="buttons">
<vaadin-button theme="icon tertiary-inline small" label="Start" hidden><iron-icon icon="lumo:play"></iron-icon></vaadin-button>
<vaadin-button theme="icon tertiary-inline small" label="Retry" hidden><iron-icon icon="lumo:reload"></iron-icon></vaadin-button>
<vaadin-button theme="icon tertiary-inline small" label="Clear"><iron-icon icon="lumo:cross"></iron-icon></vaadin-button>
</div>
</li>
`;
}
}
customElements.define('vaadin-upload-file', VaadinUploadFile);