-
Notifications
You must be signed in to change notification settings - Fork 4
/
d2l-navigation-notification-icon.js
54 lines (47 loc) · 1.21 KB
/
d2l-navigation-notification-icon.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
43
44
45
46
47
48
49
50
51
52
53
54
import '@brightspace-ui/core/components/colors/colors.js';
import { css, html, LitElement } from 'lit';
import { RtlMixin } from '@brightspace-ui/core/mixins/rtl-mixin.js';
class NavigationNotificationIcon extends RtlMixin(LitElement) {
static get properties() {
return {
thinBorder: { attribute: 'thin-border', reflect: true, type: Boolean }
};
}
static get styles() {
return css`
:host {
display: inline-block;
height: 100%;
position: absolute;
right: calc(-100% + 11px);
top: calc(-50% + 11px);
width: 100%;
}
:host([hidden]) {
display: none;
}
:host([dir="rtl"]) {
left: calc(-50% - 4px);
right: auto;
}
.d2l-navigation-notification-icon-indicator {
background: var(--d2l-color-primary-accent-indicator);
border: 2px solid white;
border-radius: 50%;
height: 10px;
width: 10px;
}
:host([thin-border]) .d2l-navigation-notification-icon-indicator {
border-width: 1px;
}
`;
}
constructor() {
super();
this.thinBorder = false;
}
render() {
return html`<div class="d2l-navigation-notification-icon-indicator"></div>`;
}
}
window.customElements.define('d2l-navigation-notification-icon', NavigationNotificationIcon);