forked from vaadin/vaadin-combo-box
-
Notifications
You must be signed in to change notification settings - Fork 2
/
vaadin-spinner.html
48 lines (45 loc) · 999 Bytes
/
vaadin-spinner.html
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
45
46
47
48
<dom-module id="vaadin-spinner">
<template>
<style>
/* Anim */
@keyframes vaadin-spin-360 {
100% {
transform: rotate(1turn);
}
}
:host {
display: block;
box-sizing: border-box;
border: 2px solid var(--primary-color, #03A9F4);
border-radius: 50%;
border-right-color: transparent;
border-top-color: transparent;
content: "";
height: 24px;
left: 50%;
margin-left: -12px;
margin-top: -12px;
position: absolute;
top: 50%;
width: 24px;
pointer-events: none;
opacity: 0;
}
:host([active]) {
opacity: 1;
animation: vaadin-spin-360 400ms linear infinite;
}
</style>
</template>
<script>
Polymer({
is: 'vaadin-spinner',
properties: {
active: {
type: Boolean,
reflectToAttribute: true
}
}
});
</script>
</dom-module>