-
Notifications
You must be signed in to change notification settings - Fork 63
/
pd-list-item.html
68 lines (67 loc) · 1.71 KB
/
pd-list-item.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
57
58
59
60
61
62
63
64
65
66
67
68
<dom-module id="pd-list-item">
<style>
a {
padding: 0.5em 1em 0.5em 3em;
display: inline-block;
width: 100%;
vertical-align: middle;
position: relative;
cursor:pointer;
box-sizing:border-box;
}
.pd-list-item iron-icon.iron-icon-0 {
position: absolute;
top: 0.5em;
}
.left iron-icon{
left: 1em;
}
.right iron-icon{
right: 0.5em;
}
.right a{
padding: 0.5em 2.5em 0.5em 1em;
}
</style>
<template>
<div class$="{{position}}">
<a title="" href$="{{url}}">
<content></content>
<iron-icon icon="{{icon}}" name="{{icon}}"></iron-icon>
</a>
</div>
</template>
</dom-module>
<script>
Polymer({
is: "pd-list-item",
properties: {
position: {
type: String,
value: true,
reflectToAttribute: true,
notify:true
},
icon: {
type: String,
value: "",
reflectToAttribute: true,
notify: true
},
url: {
type: String,
reflectToAttribute: true,
value:"",
notify: true
}
},
ready: function () {
var self = this;
if (self.position == "" || self.position == true)
self.position = "left";
if (self.url == "" || self.url == null) {
self.url = "javascript:void(0);";
}
}
});
</script>