Skip to content

Commit ec08bde

Browse files
committed
(slots) add room-list-avatar
1 parent 4876b8a commit ec08bde

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,8 @@ Example:
659659
| <div style="width:230px">Slot</div> | Action | Data | Overridden slots |
660660
| ----------------------------------- | ----------------------------------------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
661661
| `custom-action-icon` | Add a custom icon inside the footer | - | - | | `rooms-header` | Add a template on top of rooms list (above the search bar) | - | - |
662-
| `room-list-item` | Replace the template of the room list items | `room` | `room-list-options` |
662+
| `room-list-item` | Replace the template of the room list items | `room` | `room-list-avatar`, `room-list-options` |
663+
| `room-list-avatar` | Replace the avatar of room list items | `room` | |
663664
| `room-list-options` | Replace the template of the list room options | `room` | `room-list-options-icon` |
664665
| `rooms-header` | Replace the content above the search bar | - | - |
665666
| `rooms-list-search` | Replace the search bar | - | - |

src/lib/RoomsList/RoomContent/RoomContent.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<template>
22
<div class="vac-room-container">
33
<slot name="room-list-item" v-bind="{ room }">
4-
<div
5-
v-if="room.avatar"
6-
class="vac-avatar"
7-
:style="{ 'background-image': `url('${room.avatar}')` }"
8-
/>
4+
<slot name="room-list-avatar" v-bind="{ room }">
5+
<div
6+
v-if="room.avatar"
7+
class="vac-avatar"
8+
:style="{ 'background-image': `url('${room.avatar}')` }"
9+
/>
10+
</slot>
911
<div class="vac-name-container vac-text-ellipsis">
1012
<div class="vac-title-container">
1113
<div
@@ -28,7 +30,7 @@
2830
}"
2931
>
3032
<span v-if="isMessageCheckmarkVisible">
31-
<slot name="checkmark-icon" v-bind="{message: room.lastMessage}">
33+
<slot name="checkmark-icon" v-bind="{ message: room.lastMessage }">
3234
<svg-icon
3335
:name="
3436
room.lastMessage.distributed

0 commit comments

Comments
 (0)