This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2021-09-21 09:19:26 +00:00
|
|
|
import { css, CSSResult, html, LitElement, TemplateResult } from "lit";
|
2021-08-10 22:00:07 +00:00
|
|
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
|
|
|
import { PFSize } from "./Spinner";
|
2021-09-21 09:19:26 +00:00
|
|
|
import { customElement, property } from "lit/decorators";
|
2021-08-10 22:00:07 +00:00
|
|
|
|
|
|
|
@customElement("ak-loading-overlay")
|
|
|
|
export class LoadingOverlay extends LitElement {
|
2021-08-21 17:26:06 +00:00
|
|
|
@property({ type: Boolean })
|
|
|
|
topMost = false;
|
|
|
|
|
2021-08-10 22:00:07 +00:00
|
|
|
static get styles(): CSSResult[] {
|
|
|
|
return [
|
|
|
|
PFBase,
|
|
|
|
css`
|
|
|
|
:host {
|
|
|
|
display: flex;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
position: absolute;
|
|
|
|
background-color: var(--pf-global--BackgroundColor--dark-transparent-100);
|
|
|
|
z-index: 1;
|
|
|
|
}
|
2021-08-21 17:26:06 +00:00
|
|
|
:host([topMost]) {
|
|
|
|
z-index: 999;
|
|
|
|
}
|
2021-08-10 22:00:07 +00:00
|
|
|
`,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
render(): TemplateResult {
|
|
|
|
return html`<ak-spinner size=${PFSize.XLarge}></ak-spinner>`;
|
|
|
|
}
|
|
|
|
}
|