2021-10-28 07:48:51 +00:00
|
|
|
import { CSSResult, LitElement, TemplateResult, css, html } from "lit";
|
2021-11-04 21:34:48 +00:00
|
|
|
import { customElement } from "lit/decorators.js";
|
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>`;
|
|
|
|
}
|
|
|
|
}
|