Skip to content

Commit e5a548f

Browse files
committed
(prop) add room-header-avatar
1 parent e2d2c44 commit e5a548f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,7 @@ Example:
631631
| rooms-header | Add a template on top of rooms list (above the search bar) | - | - |
632632
| room-list-item | Replace the template of the room list items | rooms | - |
633633
| room-header | Replace the template of the room header | room, typingUsers, userStatus | room-options, menu-icon, toggle-icon |
634+
| room-header-avatar | Replace the template of the room header avatar | room |
634635
| room-header-info | Replace the template of the room header text | room, typingUsers, userStatus |
635636
| room-options | Replace the template of the room options | - | menu-icon |
636637
| message | Replace the template of the message box | message | deleted-icon, eye-icon, document-icon, pencil-icon, checkmark-icon, dropdown-icon, emoji-picker-icon |

src/ChatWindow/Room.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@
3131
:class="{ 'vac-item-clickable': roomInfo }"
3232
@click="$emit('roomInfo', room)"
3333
>
34-
<div
35-
v-if="room.avatar"
36-
class="vac-room-avatar"
37-
:style="{ 'background-image': `url('${room.avatar}')` }"
38-
></div>
34+
<slot name="room-header-avatar" v-bind="{ room }">
35+
<div
36+
v-if="room.avatar"
37+
class="vac-room-avatar"
38+
:style="{ 'background-image': `url('${room.avatar}')` }"
39+
></div>
40+
</slot>
3941
<slot
4042
name="room-header-info"
4143
v-bind="{ room, typingUsers, userStatus }"

0 commit comments

Comments
 (0)