import { LitElement, html, unsafeCSS } from 'lit'; import { property } from 'lit/decorators.js'; export class List extends LitElement { @property({ type: Boolean }) dense = false; @property({ type: Boolean }) disablePadding = false; @property({ type: String }) subheader = ''; static styles = unsafeCSS` :host { display: block; font-family: "Roboto", "Helvetica", "Arial", sans-serif; } .list { margin: 0; padding: 8px 0; position: relative; list-style: none; } .list.dense { padding: 4px 0; } .list.disablePadding { padding: 0; } .subheader { color: rgba(0, 0, 0, 0.6); font-size: 0.875rem; font-weight: 500; line-height: 48px; padding: 0 16px; position: sticky; top: 0; background-color: inherit; z-index: 1; } .subheader.dense { line-height: 40px; } `; render() { const listClasses = [ 'list', this.dense ? 'dense' : '', this.disablePadding ? 'disablePadding' : '' ].filter(Boolean).join(' '); return html` ${this.subheader ? html`