Skip to content

Commit f3f3087

Browse files
committed
(docs) add message reaction
1 parent 7742e75 commit f3f3087

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ You can import it as a custom component:
8989
| messageActions (5) | Array | - | (4) |
9090
| showFiles | Boolean | - | true |
9191
| showEmojis | Boolean | - | true |
92+
| showReactionEmojis | Boolean | - | true |
9293
| textMessages (6) | Object | - | null |
9394
| theme (7) | Sring | - | light |
9495
| colors (8) | Object | - | (8) |
@@ -138,7 +139,7 @@ messageActions="[
138139
You can use built-in `messageActions` names to trigger specific UI modifications when clicked.<br>
139140
Currently, `replyMessage`, `editMessage` and `deleteMessage` action names are available.<br>
140141
If `messageActions` is not set, it will use the default values below.<br>
141-
If you don't want to display this `messageActions`menu, you can pass it an empty array.
142+
If you don't want to display this `messageActions` menu, you can pass it an empty array.
142143

143144
```javascript
144145
messageActions="[
@@ -230,7 +231,17 @@ colors="{
230231
colorReplyUsername: '#0a0a0a',
231232
colorReply: '#6e6e6e',
232233
backgroundImage: '#ddd',
233-
colorNewMessages: '#1976d2'
234+
colorNewMessages: '#1976d2',
235+
backgroundReaction: '#eee',
236+
borderStyleReaction: '1px solid #eee',
237+
backgroundReactionHover: '#fff',
238+
borderStyleReactionHover: '1px solid #ddd',
239+
colorReactionCounter: '#0a0a0a',
240+
backgroundReactionMe: '#cfecf5',
241+
borderStyleReactionMe: '1px solid #3b98b8',
242+
backgroundReactionHoverMe: '#cfecf5',
243+
borderStyleReactionHoverMe: '1px solid #3b98b8',
244+
colorReactionCounterMe: '#0b59b3'
234245
},
235246
236247
room: {
@@ -256,6 +267,7 @@ colors="{
256267
send: '#1976d2',
257268
sendDisabled: '#9ca6af',
258269
emoji: '#1976d2',
270+
emojiReaction: '#828c94',
259271
document: '#1976d2',
260272
pencil: '#9e9e9e',
261273
checkmark: '#0696c7',
@@ -318,6 +330,15 @@ messages="[
318330
size: 67351,
319331
type: 'png',
320332
url: 'https://firebasestorage.googleapis.com/...'
333+
},
334+
reactions: {
335+
wink: [
336+
1234, // USER_ID
337+
4321
338+
],
339+
laughing: [
340+
1234
341+
]
321342
}
322343
}
323344
]"
@@ -335,6 +356,7 @@ messages="[
335356
| addRoom | - | A user clicks on the plus icon next to searchbar |
336357
| menuActionHandler (2) | `{ roomId, action }` | A user clicks on the vertical dots icon inside a room |
337358
| messageActionHandler (3) | `{ roomId, action }` | A user clicks on the dropdown icon inside a message |
359+
| sendMessageReaction | `{ roomId, messageId, reaction, remove }` | A user clicks on the emoji icon inside a message |
338360

339361
(1) `fetchMessages` should be a method implementing a pagination system. Its purpose is to load older messages of a conversation when the user scroll on top
340362

0 commit comments

Comments
 (0)