Skip to content

Commit

Permalink
fix(avatar): make size property as abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
anujsi committed Mar 8, 2023
1 parent a57ce83 commit a310bc4
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit a310bc4

Please sign in to comment.