forked from BrightspaceUILabs/navigation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
d2l-navigation.js
42 lines (37 loc) · 1.09 KB
/
d2l-navigation.js
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
import '@polymer/polymer/polymer-legacy.js';
import './d2l-navigation-band.js';
import { navigationSharedStyle } from './d2l-navigation-shared-styles.js';
import { PolymerElement, html } from '@polymer/polymer/polymer-element.js';
/**
`d2l-navigation`
Polymer-based web component for the all encompasing navigation wrapper component
@demo demo/navigation.html
*/
class D2LNavigation extends PolymerElement {
static get template() {
const template = html`
${navigationSharedStyle}
<style>
:host {
display: block;
position: relative;
}
.d2l-navigation-shadow-drop-border {
display: var(--d2l-navigation-shadow-drop-border-display, block);
background-color: rgba(0,0,0,0.02);
bottom: -4px;
height: 4px;
pointer-events: none;
position: absolute;
width: 100%;
}
</style>
<d2l-navigation-band><slot name="navigation-band"></slot></d2l-navigation-band>
<slot></slot>
<div class="d2l-navigation-shadow-drop-border"></div>
`;
template.setAttribute('strip-whitespace', '');
return template;
}
}
customElements.define('d2l-navigation', D2LNavigation);