From 66af796878b4f4752f4d0a5b0b78146bf9e14eb4 Mon Sep 17 00:00:00 2001 From: Benny Powers Date: Sun, 31 Mar 2024 13:46:47 +0300 Subject: [PATCH] fix(card): make slot controller private --- elements/pf-card/pf-card.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/elements/pf-card/pf-card.ts b/elements/pf-card/pf-card.ts index 841df77fc2..9e5d9c1b7f 100644 --- a/elements/pf-card/pf-card.ts +++ b/elements/pf-card/pf-card.ts @@ -1,10 +1,9 @@ -import { customElement } from 'lit/decorators/custom-element.js'; import { LitElement, html } from 'lit'; -import { SlotController } from '@patternfly/pfe-core/controllers/slot-controller.js'; - +import { customElement } from 'lit/decorators/custom-element.js'; +import { property } from 'lit/decorators/property.js'; import { classMap } from 'lit/directives/class-map.js'; -import { property } from 'lit/decorators/property.js'; +import { SlotController } from '@patternfly/pfe-core/controllers/slot-controller.js'; import style from './pf-card.css'; @@ -80,24 +79,24 @@ export class PfCard extends LitElement { */ @property({ type: Boolean, reflect: true }) plain = false; - protected slots = new SlotController(this, 'header', null, 'footer'); + #slots = new SlotController(this, 'header', null, 'footer'); render() { return html`
+ class="${classMap({ empty: this.#slots.isEmpty(null) })}">