07d13c9c
isisadmin
polymer catalog
|
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
|
<link rel="import" href="../../bower_components/iron-icons/iron-icons.html">
<link rel="import" href="../catalog-element/catalog-element.html">
<dom-module id="cart-item">
<style>
:host {
display: block;
font-size: 16px;
padding: 12px 16px;
@apply(--layout);
@apply(--layout-horizontal);
cursor: pointer;
}
:host(:hover) iron-icon {
opacity: 0.85;
}
iron-icon:hover {
opacity: 1.0;
}
iron-icon {
width: 16px !important;
height: 16px !important;
cursor: pointer;
margin: 0 6px;
opacity: 0.0;
transition: var(--material-curve-320);
}
</style>
<template>
<span class="flex">[[element.name]]</span>
<iron-icon icon="description" view="docs" on-tap="_nav"></iron-icon>
<iron-icon icon="visibility" view="demo" on-tap="_nav"></iron-icon>
<iron-icon icon="clear" on-tap="_remove"></iron-icon>
</template>
</dom-module>
<script>
Polymer({
is: 'cart-item',
properties: {
element: String
},
_remove: function() {
this.fire('remove');
},
_nav: function(e) {
var view = e.currentTarget.getAttribute('view');
this.fire('nav', {url: '/elements/' + this.element.name + '?view=' + view});
}
});
</script>
|