-
Notifications
You must be signed in to change notification settings - Fork 36
/
dashboard-tile.html
56 lines (49 loc) · 1.02 KB
/
dashboard-tile.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
49
50
51
52
53
54
55
56
<dom-module id="dashboard-tile">
<template>
<style>
.tile {
background: #0F9D23;
width: 65px;
padding: 9px 0;
color: #FFF;
margin: 0 1px 9px 0;
float: left;
}
.tile .small {
font-size: 11px;
text-align: center;
}
.tile .big {
font-size: 22px;
text-align: center;
}
.tile.pink {
background: hotpink;
}
.tile.blue {
background: cornflowerblue;
}
.tile.gray {
background: #222;
}
</style>
<div class$="{{ computeClass(skin) }}">
<div class="small">{{ label }}</div>
<div class="big">{{ value }}</div>
</div>
<content></content>
</template>
<script>
Polymer({
is: 'dashboard-tile',
properties: {
label: { notify: true },
skin: { notify: true },
value: { notify: true }
},
computeClass: function (skin) {
return 'tile ' + skin;
}
});
</script>
</dom-module>