Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/pfavatar-2349.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@patternfly/pfe-avatar": major
---

Made `size` property on `BaseAvatar` class as abstract.
6 changes: 3 additions & 3 deletions elements/pf-avatar/BaseAvatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class AvatarLoadEvent extends Event {
* @summary For displaying a user's avatar image
*/

export class BaseAvatar extends LitElement {
export abstract class BaseAvatar extends LitElement {
static readonly styles = [style];

/** The URL to the user's custom avatar image. */
Expand All @@ -26,15 +26,15 @@ export class BaseAvatar extends LitElement {
@property({ reflect: true }) alt?: string = 'Avatar image';

/** Size of the Avatar */
@property({ reflect: true }) size: 'sm'|'md'|'lg'|'xl' = 'sm';
abstract size?: string;

/** Whether or not the Avatar image is dark */
@property({ type: Boolean, reflect: true }) dark = false;

render() {
return this.src != null ? html`
<img
size=${this.size}
size=${this.size ?? ''}
alt=${this.alt ?? ''}
@load="${(e: Event) => this.dispatchEvent(new AvatarLoadEvent(e))}"
src=${this.src}>
Expand Down