-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathlist.ts
More file actions
50 lines (42 loc) · 1.27 KB
/
list.ts
File metadata and controls
50 lines (42 loc) · 1.27 KB
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
import { LitElement, html } from 'lit';
import { themes } from '../../theming/theming-decorator.js';
import { registerComponent } from '../common/definitions/register.js';
import IgcListHeaderComponent from './list-header.js';
import IgcListItemComponent from './list-item.js';
import { styles } from './themes/container.base.css.js';
import { all } from './themes/container.js';
import { styles as shared } from './themes/shared/container/list.common.css.js';
/**
* Displays a collection of data items in a templatable list format.
*
* @element igc-list
*
* @slot - Renders the list items and list headers inside default slot.
*/
@themes(all)
export default class IgcListComponent extends LitElement {
public static readonly tagName = 'igc-list';
public static override styles = [styles, shared];
/* blazorSuppress */
public static register() {
registerComponent(
IgcListComponent,
IgcListItemComponent,
IgcListHeaderComponent
);
}
private _internals: ElementInternals;
constructor() {
super();
this._internals = this.attachInternals();
this._internals.role = 'list';
}
protected override render() {
return html`<slot></slot>`;
}
}
declare global {
interface HTMLElementTagNameMap {
'igc-list': IgcListComponent;
}
}