@@ -165,7 +165,7 @@ fetchMessages({ room, options }) {
165
165
## Props API
166
166
167
167
| Prop | Type | Required | Default |
168
- | -------------------------- | ---------------- | -------- | ------- |
168
+ | ---------------------------- | ------------------ | ---------- | --------- |
169
169
| height | String | - | 600px |
170
170
| currentUserId (1) | [ String, Number] | true | - |
171
171
| rooms | Array | - | [ ] |
@@ -189,7 +189,8 @@ fetchMessages({ room, options }) {
189
189
| responsiveBreakpoint (12) | Number | - | 900 |
190
190
| singleRoom (13) | Boolean | - | false |
191
191
| theme (14) | Sring | - | light |
192
- | styles (15) | Object | - | (10) |
192
+ | acceptedFiles (15) | String | - | "* " |
193
+ | styles (16) | Object | - | (10) |
193
194
194
195
(1) ` currentUserId ` is required to display UI and trigger actions according to the user using the chat (ex: messages position on the right, etc.)
195
196
@@ -286,7 +287,7 @@ textMessages="{
286
287
(11) ` textFormatting ` can be used to add text formatting. Currently, bold, italic, strikethrough, underline, inline code and multiline code formatting are available and can be used in conjonction. You can disable text formatting by passing the prop as ` :textFormatting="false" ` .
287
288
288
289
| Style | Syntax | Example | Output |
289
- | ----------------- | --------------- | -------------------------------------- | -------------------------------------- |
290
+ | ------------------- | ----------------- | ---------------------------------------- | ---------------------------------------- |
290
291
| Bold | ` * * ` | ` *This is bold text* ` | ** This is bold text** |
291
292
| Italic | ` _ _ ` | ` _This text is italicized_ ` | _ This text is italicized_ |
292
293
| Strikethrough | ` ~ ~ ` | ` ~This was mistaken text~ ` | ~~ This was mistaken text~~ |
@@ -316,7 +317,11 @@ multiline code
316
317
317
318
(14) ` theme ` can be used to change the chat theme. Currently, only ` light ` and ` dark ` are available.
318
319
319
- (15) ` styles ` can be used to customize your own theme. Ex:
320
+ (15) ` acceptedFiles ` can be used to set specifics file types allowed in chat. By default, all file types are allowed: ` "*" ` .
321
+
322
+ Example: set ` "accepted-files="image/png, image/jpeg, application/pdf" ` to allow ` JPG ` ` PNG ` and ` PDF ` files
323
+
324
+ (16) ` styles ` can be used to customize your own theme. Ex:
320
325
321
326
``` javascript
322
327
styles= " {
@@ -556,7 +561,7 @@ messages="[
556
561
## Events API
557
562
558
563
| Event | Params | Fires when |
559
- | ------------------------- | --------------------------------------------------------------- | ----------------------------------------------------- |
564
+ | --------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------- |
560
565
| fetchMessages (1) | ` { room, options } ` | A user has scrolled on top to load more messages |
561
566
| sendMessage | ` { roomId, content, file (5), replyMessage (6) } ` | A user has sent a message |
562
567
| editMessage | ` { roomId, messageId, newContent, file (5), replyMessage (6) } ` | A user has edited a message |
@@ -621,11 +626,11 @@ Example:
621
626
< / template>
622
627
```
623
628
624
- | Slot | Action | Data | Overridden slots |
625
- | -------------------------- | ----------------------------------------------------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------- |
626
- | rooms-header | Add a template on top of rooms list (above the search bar) | - | - |
627
- | room-list-item | Replace the template of the room list items | rooms | - |
628
- | room-header | Replace the template of the room header | room, typingUsers, userStatus | room-options, menu-icon, toggle-icon |
629
+ | Slot | Action | Data | Overridden slots |
630
+ | ----------------| ------------------------------------------------------------ | -------------------------------| --------------------------------------|
631
+ | rooms-header | Add a template on top of rooms list (above the search bar) | - | - |
632
+ | room-list-item | Replace the template of the room list items | rooms | - |
633
+ | room-header | Replace the template of the room header | room, typingUsers, userStatus | room-options, menu-icon, toggle-icon |
629
634
| room-header-info | Replace the template of the room header text | room, typingUsers, userStatus |
630
635
| room-options | Replace the template of the room options | - | menu-icon |
631
636
| message | Replace the template of the message box | message | deleted-icon, eye-icon, document-icon, pencil-icon, checkmark-icon, dropdown-icon, emoji-picker-icon |
0 commit comments