-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonomer-breadcrumbs-item.html
47 lines (46 loc) · 1.13 KB
/
monomer-breadcrumbs-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
<link rel="import" href="../polymer/polymer.html">
<dom-module id="monomer-breadcrumbs-item">
<template>
<style>
:host {
position: relative;
padding-top: 6px;
padding-bottom: 6px;
padding-left: 20px;
padding-right: 20px;
height: 40px;
font-size: 16px;
display: flex;
align-items: center;
box-sizing: border-box;
}
#arrow {
position: absolute;
top: 0;
right: -10px;
width: 0;
height: 0;
border-top: 20px solid transparent;
border-left-width: 10px;
border-left-style: solid;
border-bottom: 20px solid transparent;
}
</style>
<div id="main">[[text]]<div id="arrow"></div></div>
</template>
<script>
Polymer({
is: 'monomer-breadcrumbs-item',
properties: {
text: String,
color: String,
order: Number,
},
ready: function () {
this.style.backgroundColor = this.color;
this.style.order = this.order;
this.$.arrow.style.borderLeftColor = this.color;
}
});
</script>
</dom-module>