mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-21 16:57:09 +00:00
* Added optional label for dialog-data-entry-flow * Use correct loading element * Update src/translations/en.json Co-Authored-By: Bram Kragten <mail@bramkragten.nl> * Minor template adjustment * Revert accidental change of PR templates * Revert accidental change of PR templates Co-authored-by: Bram Kragten <mail@bramkragten.nl>
44 lines
822 B
TypeScript
44 lines
822 B
TypeScript
import {
|
|
LitElement,
|
|
TemplateResult,
|
|
html,
|
|
css,
|
|
customElement,
|
|
CSSResult,
|
|
property,
|
|
} from "lit-element";
|
|
import "@polymer/paper-spinner/paper-spinner-lite";
|
|
|
|
@customElement("step-flow-loading")
|
|
class StepFlowLoading extends LitElement {
|
|
@property() public label?: string;
|
|
|
|
protected render(): TemplateResult {
|
|
return html`
|
|
<div class="init-spinner">
|
|
${this.label
|
|
? html`
|
|
<div>${this.label}</div>
|
|
`
|
|
: ""}
|
|
<paper-spinner-lite active></paper-spinner-lite>
|
|
</div>
|
|
`;
|
|
}
|
|
|
|
static get styles(): CSSResult {
|
|
return css`
|
|
.init-spinner {
|
|
padding: 50px 100px;
|
|
text-align: center;
|
|
}
|
|
`;
|
|
}
|
|
}
|
|
|
|
declare global {
|
|
interface HTMLElementTagNameMap {
|
|
"step-flow-loading": StepFlowLoading;
|
|
}
|
|
}
|