Skip to content

Commit 517f8c0

Browse files
committed
(docs) add named slots example
1 parent d9a5b3a commit 517f8c0

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,10 @@ Message objects are rendered differently depending on their type. Currently, onl
433433
Each message object has a `sender_id` field which holds the id of the corresponding agent. If `sender_id` matches the `currentUserId` prop, specific UI and actions will be implemented.<br><br>
434434
Note: `username` will be displayed on each message of corresponding agents if at least 3 users are in the room.<br><br>
435435
Message states:
436-
- `saved: true` one checkmark
437-
- `distributed: true` two checkmarks
438-
- `seen: true` two blue checkmarks
436+
437+
- `saved: true` one checkmark
438+
- `distributed: true` two checkmarks
439+
- `seen: true` two blue checkmarks
439440

440441
```javascript
441442
messages="[
@@ -528,8 +529,16 @@ messageActionHandler({ roomId, action, message }) {
528529

529530
## Named Slots
530531

532+
Example:
533+
534+
```html
535+
<template v-slot:rooms-header>
536+
This is the new rooms header
537+
</template>
538+
```
539+
531540
| Slot | Action | Data | Overridden slots |
532-
|----------------------------|-------------------------------------------------------------|-------------------------------|------------------------------------------------------------------------------------------------------|
541+
| -------------------------- | ----------------------------------------------------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------- |
533542
| rooms-header | Add a template on top of rooms list (above the search bar) | - | - |
534543
| room-list-item | Replace the template of the room list items | rooms | - |
535544
| room-header | Replace the template of the room header | room, typingUsers, userStatus | room-options, menu-icon, toggle-icon |

0 commit comments

Comments
 (0)