forked from Collaborne/paper-bottom-sheet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpaper-bottom-sheet-item.html
More file actions
102 lines (82 loc) · 2.07 KB
/
paper-bottom-sheet-item.html
File metadata and controls
102 lines (82 loc) · 2.07 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-icon/iron-icon.html">
<link rel="import" href="../iron-icons/iron-icons.html">
<link rel="import" href="../paper-item/paper-icon-item.html">
<link rel="import" href="../paper-item/paper-item-body.html">
<link rel="import" href="../paper-ripple/paper-ripple.html">
<link rel="import" href="../paper-styles/paper-styles.html">
<dom-module id="paper-bottom-sheet-item">
<template>
<style>
:host{
display: block;
}
.item {
margin: 0;
background: white;
position: relative;
}
.item::shadow .content-icon{
margin-right: 32px;
width: auto;
}
.text{
color: rgba(0, 0, 0, 0.87);
word-break: break-word;
}
iron-icon{
color: rgba(0, 0, 0, 0.54);
}
.official-color {
width: 18px;
height: 18px;
margin-top: -3px;
margin-left: 4px;
color: #1e88e5;
}
.ripple {
/* Workaround: Ripple doesn"t claim full space in paper-icon-item */
padding-right: 0;
}
:host[warning] {
color: var(--paper-red-900);
}
</style>
<paper-icon-item class="item">
<paper-ripple class="ripple" fit></paper-ripple>
<iron-icon src="{{url}}" icon="{{icon}}" item-icon></iron-icon>
<span class="text">
[[text]]
<template is="dom-if" if="{{official}}">
<iron-icon class="official-color" icon="icons:verified-user" item-icon></iron-icon>
</template>
</span>
</paper-icon-item>
</template>
</dom-module>
<script>
(function() {
Polymer({
is: "paper-bottom-sheet-item",
properties: {
text: String,
url: {
type: String
},
icon: {
type: String
},
warning: {
type: Boolean,
value: false,
reflectToAttribute: true
},
official: {
type: Boolean,
value: false,
reflectToAttribute: true
}
},
});
})();
</script>