-
Notifications
You must be signed in to change notification settings - Fork 25
/
list-item.js
37 lines (30 loc) · 971 Bytes
/
list-item.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
import { ListItemLinkMixin } from './list-item-link-mixin.js';
import { LitElement } from 'lit';
/**
* A component for a "listitem" child within a list. It provides semantics, basic layout, breakpoints for responsiveness, a link for navigation, and selection.
* @slot - Default content placed inside of the component
* @slot illustration - Image associated with the list item located at the left of the item
* @slot actions - Actions (e.g., button icons) associated with the listen item located at the right of the item
* @slot nested - Nested d2l-list element
*/
class ListItem extends ListItemLinkMixin(LitElement) {
static get properties() {
return {
/**
* Address of item link if navigable
* @type {string}
*/
href: { type: String }
};
}
get href() {
return this.actionHref;
}
set href(value) {
this.actionHref = value;
}
render() {
return this._renderListItem();
}
}
customElements.define('d2l-list-item', ListItem);