mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-08 18:39:40 +00:00
* Add ha cloud login to onboarding * Add view for no cloud backup available * Add logout and forgot pw * Improve styling * Fix bug to open cloud backup after login * Remove callback from catch in transform methods * Remove unused variable * Fix lint * Add new onboarding restore design * Fix lint * Change back button style * Update header styles * Style onboarding left aligned * Remove unused imports * Fix imports * Fix multi factor cloud auth * Fix prettier * Edit onboarding translations * Revert gulp change * Improve cloud login component * Fix no-cloud-backup naming * fix types * Use cloud login function directly * Fix eslint * Hide restore picker when there is nothing to select * Fix eslint
51 lines
1.1 KiB
TypeScript
51 lines
1.1 KiB
TypeScript
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`
|
|
<div
|
|
role=${ifDefined(this.label ? "separator" : undefined)}
|
|
aria-label=${ifDefined(this.label)}
|
|
>
|
|
<span class="line"></span>
|
|
${this.label
|
|
? html`
|
|
<span class="label">${this.label}</span>
|
|
<span class="line"></span>
|
|
`
|
|
: nothing}
|
|
</div>
|
|
`;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|