import { css, html, LitElement, nothing } from "lit"; import { ifDefined } from "lit/directives/if-defined"; import { customElement, property } from "lit/decorators"; @customElement("ha-divider") export class HaMdDivider extends LitElement { @property() public label?: string; public render() { return html`
${this.label ? html` ${this.label} ` : nothing}
`; } static styles = css` :host { width: var(--ha-divider-width, 100%); } div { display: flex; align-items: center; justify-content: center; } .label { padding: var(--ha-divider-label-padding, 0 16px); } .line { flex: 1; background-color: var(--divider-color); height: var(--ha-divider-line-height, 1px); } `; } declare global { interface HTMLElementTagNameMap { "ha-divider": HaMdDivider; } }