-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaqa-panel-right.html
80 lines (74 loc) · 1.95 KB
/
aqa-panel-right.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
69
70
71
72
73
74
75
76
77
78
79
80
<link rel="import" href="../polymer/polymer-element.html">
<link rel="import" href="../app-layout/app-drawer/app-drawer.html">
<link rel="import" href="../app-layout/app-toolbar/app-toolbar.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<link rel="import" href="./bower_components/iron-icons/iron-icons.html">
<link rel="import" href="./bower_components/aqa-font/aqa-mitr-font.html">
<dom-module id="aqa-panel-right">
<template>
<style>
:host {
display: block;
font-family: MitrLight;
--app-drawer-width: var(--app-panel-right-width, 750px);
--app-drawer-content-container:{
background-color: #ECEFF1;
}
}
#drawer {
z-index: 2;
text-align: left;
}
app-toolbar {
height: 60px;
background-color: var(--app-panel-right-background-color, #62A7E9);
color: white;
}
.content{
height: 100%;
overflow: auto;
padding: 0.5rem;
}
</style>
<app-drawer align="right" id="drawer">
<app-toolbar>
<div main-title>[[title]]</div>
<paper-icon-button icon="close" on-tap="closePanel"></paper-icon-button>
</app-toolbar>
<div class="content">
<slot></slot>
</div>
</app-drawer>
</template>
<script>
/**
* `aqa-panel-right`
*
*
* @customElement
* @polymer
* @demo demo/index.html
*/
class AqaPanelRight extends Polymer.Element {
static get is() { return 'aqa-panel-right'; }
static get properties() {
return {
title: {
type: String,
value: 'aqa-panel-right'
}
};
}
open() {
this.$.drawer.open()
}
toggle(){
this.$.drawer.toggle()
}
closePanel(){
this.$.drawer.close()
}
}
window.customElements.define(AqaPanelRight.is, AqaPanelRight);
</script>
</dom-module>