2021-09-21 09:19:26 +00:00
|
|
|
import { css, CSSResult, html, LitElement, TemplateResult } from "lit";
|
|
|
|
import { customElement } from "lit/decorators";
|
2021-03-29 15:34:24 +00:00
|
|
|
|
2021-09-21 09:31:37 +00:00
|
|
|
import AKGlobal from "../authentik.css";
|
|
|
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
|
|
|
|
2021-03-29 15:34:24 +00:00
|
|
|
@customElement("ak-divider")
|
|
|
|
export class Divider extends LitElement {
|
|
|
|
static get styles(): CSSResult[] {
|
2021-08-03 15:52:21 +00:00
|
|
|
return [
|
|
|
|
PFBase,
|
|
|
|
AKGlobal,
|
|
|
|
css`
|
|
|
|
.separator {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
text-align: center;
|
|
|
|
}
|
2021-03-29 15:34:24 +00:00
|
|
|
|
2021-08-03 15:52:21 +00:00
|
|
|
.separator::before,
|
|
|
|
.separator::after {
|
|
|
|
content: "";
|
|
|
|
flex: 1;
|
|
|
|
border-bottom: 1px solid var(--pf-global--Color--100);
|
|
|
|
}
|
2021-03-29 15:34:24 +00:00
|
|
|
|
2021-08-03 15:52:21 +00:00
|
|
|
.separator:not(:empty)::before {
|
|
|
|
margin-right: 0.25em;
|
|
|
|
}
|
2021-03-29 15:34:24 +00:00
|
|
|
|
2021-08-03 15:52:21 +00:00
|
|
|
.separator:not(:empty)::after {
|
|
|
|
margin-left: 0.25em;
|
|
|
|
}
|
|
|
|
`,
|
|
|
|
];
|
2021-03-29 15:34:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
render(): TemplateResult {
|
|
|
|
return html`<div class="separator"><slot></slot></div>`;
|
|
|
|
}
|
|
|
|
}
|