web/elements: allow aggregate cards' elements to not be centered

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-14 15:22:52 +01:00
parent 32ace1bece
commit 6b39d616b1

View file

@ -18,6 +18,9 @@ export class AggregateCard extends LitElement {
@property() @property()
headerLink?: string; headerLink?: string;
@property({ type: Boolean })
isCenter = true;
static get styles(): CSSResult[] { static get styles(): CSSResult[] {
return [PFBase, PFCard, PFFlex, AKGlobal].concat([ return [PFBase, PFCard, PFFlex, AKGlobal].concat([
css` css`
@ -59,7 +62,9 @@ export class AggregateCard extends LitElement {
</div> </div>
${this.renderHeaderLink()} ${this.renderHeaderLink()}
</div> </div>
<div class="pf-c-card__body center-value">${this.renderInner()}</div> <div class="pf-c-card__body ${this.isCenter ? "center-value" : ""}">
${this.renderInner()}
</div>
</div>`; </div>`;
} }
} }