diff --git a/.changeset/remove-basetile.md b/.changeset/remove-basetile.md new file mode 100644 index 0000000000..cb6f2713cb --- /dev/null +++ b/.changeset/remove-basetile.md @@ -0,0 +1,4 @@ +--- +"@patternfly/elements": major +--- +``: Removed `BaseTile` class. Reimplement (recommended) or extend `PfTile`. diff --git a/elements/pf-tile/BaseTile.ts b/elements/pf-tile/BaseTile.ts deleted file mode 100644 index 4411873205..0000000000 --- a/elements/pf-tile/BaseTile.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { LitElement, html } from 'lit'; - - -/** - * @slot icon - Icon expects a `` or `` - * @slot title - the title of the tile should be a heading - * @slot - The content should be a paragraph - * - * @csspart icon - container for the icon - * @csspart title - container for the title - * @csspart body - container for the body content - */ -export abstract class BaseTile extends LitElement { - override render() { - return html` -
-
- -
-
- -
-
-
- -
- `; - } -} diff --git a/elements/pf-tile/pf-tile.ts b/elements/pf-tile/pf-tile.ts index a891b80d8c..dafdabd46c 100644 --- a/elements/pf-tile/pf-tile.ts +++ b/elements/pf-tile/pf-tile.ts @@ -1,9 +1,7 @@ - +import { LitElement, html } from 'lit'; import { customElement } from 'lit/decorators/custom-element.js'; import { property } from 'lit/decorators/property.js'; -import { BaseTile } from './BaseTile.js'; - import styles from './pf-tile.css'; export type StackedSize = ( @@ -54,15 +52,31 @@ export type StackedSize = ( * @cssprop {} --pf-c-tile__icon--MarginRight {@default `0`} * @cssprop {} --pf-c-tile__icon--FontSize {@default `1.5rem`} * - * @cssprop {} --pf-c-tile__header--m-stacked__icon--MarginBottom {@default `0.25rem`} + * @cssprop {} --pf-c-tile__header--m-stacked__icon--MarginBottom {@default `0.25rem`} */ @customElement('pf-tile') -export class PfTile extends BaseTile { +export class PfTile extends LitElement { static readonly styles = [styles]; @property({ reflect: true, type: Boolean }) selected = false; @property({ reflect: true }) stacked?: StackedSize; + + override render() { + return html` +
+
+ +
+
+ +
+
+
+ +
+ `; + } } declare global {