Skip to content

Commit

Permalink
refactor(chat): Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
marker dao ® committed Jul 24, 2024
1 parent 74da06c commit afbd50c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/devextreme/js/__internal/ui/chat/chat_avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { WidgetOptions } from '@js/ui/widget/ui.widget';
import Widget from '../widget';

const CHAT_MESSAGE_AVATAR_CLASS = 'dx-chat-message-avatar';
const CHAT_MESSAGE_AVATAR_LETTERS_CLASS = 'dx-chat-message-avatar-letters';
const CHAT_MESSAGE_AVATAR_INITIALS_CLASS = 'dx-chat-message-avatar-initials';

export interface AvatarOptions extends WidgetOptions<Avatar> {
name?: string;
Expand All @@ -29,17 +29,17 @@ class Avatar extends Widget<AvatarOptions> {

super._initMarkup();

const $letters = $('<div>').addClass(CHAT_MESSAGE_AVATAR_LETTERS_CLASS);
const $initials = $('<div>').addClass(CHAT_MESSAGE_AVATAR_INITIALS_CLASS);

const { name } = this.option();

if (name) {
const text = this._getAvatarInitials(name);

$letters.text(text);
$initials.text(text);
}

$letters.appendTo(this.element());
$initials.appendTo(this.element());
}

_optionChanged(args: Record<string, unknown>): void {
Expand Down

0 comments on commit afbd50c

Please sign in to comment.