web: add default icon for empty state

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-16 20:39:07 +01:00
parent 6717f2a68d
commit db99225c65
3 changed files with 7 additions and 9 deletions

View File

@ -1,16 +1,11 @@
import { css, CSSResult } from "lit-element";
// @ts-ignore
import PF from "@patternfly/patternfly/patternfly.css";
// @ts-ignore
import PFAddons from "@patternfly/patternfly/patternfly-addons.css";
// @ts-ignore
import FA from "@fortawesome/fontawesome-free/css/fontawesome.css";
// @ts-ignore
import AKGlobal from "../authentik.css";
// @ts-ignore
import CodeMirrorStyle from "codemirror/lib/codemirror.css";
// @ts-ignore
import CodeMirrorTheme from "codemirror/theme/monokai.css";
export const ColorStyles = css`
.pf-m-success {
color: var(--pf-global--success-color--100);

View File

@ -1,5 +1,7 @@
import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
import { COMMON_STYLES } from "../common/styles";
import PFEmptyState from "@patternfly/patternfly/components/EmptyState/empty-state.css"
import PFBase from "@patternfly/patternfly/patternfly-base.css"
import FA from "@fortawesome/fontawesome-free/css/fontawesome.css";
@customElement("ak-empty-state")
export class EmptyState extends LitElement {
@ -11,13 +13,13 @@ export class EmptyState extends LitElement {
header?: string;
static get styles(): CSSResult[] {
return COMMON_STYLES;
return [PFEmptyState, PFBase, FA];
}
render(): TemplateResult {
return html`<div class="pf-c-empty-state">
<div class="pf-c-empty-state__content">
<i class="pf-icon ${this.icon} pf-c-empty-state__icon" aria-hidden="true"></i>
<i class="pf-icon fa ${this.icon || "fa-question-circle"} pf-c-empty-state__icon" aria-hidden="true"></i>
<h1 class="pf-c-title pf-m-lg">
${this.header}
</h1>

1
web/src/global.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare module "*.css";