You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -81,15 +82,17 @@ You can import it as a custom component:
81
82
| showFiles | Boolean | - | true |
82
83
| showEmojis | Boolean | - | true |
83
84
| textMessages (4) | Object | - | null |
85
+
| theme (5) | Sring | - | light |
86
+
| colors (6) | Object | - | (6) |
84
87
85
-
(1) `loadingRooms`is must be used to show/hide a spinner icon while rooms are loading
88
+
(1) `loadingRooms`can be used to show/hide a spinner icon while rooms are loading
86
89
87
90
(2) `messagesLoaded` must be manually set to `true` when all messages of a conversation have been loaded. Meaning the user cannot scroll on top anymore
88
91
89
92
(3) `menuActions` can be used to display your own buttons when clicking the vertical dots icon inside a room.<br>
90
93
You can then use the [menuActionHandler](#events-api) event to call your own action after clicking a button. Ex:
91
94
92
-
```html
95
+
```javascript
93
96
menuActions="[
94
97
{
95
98
name: 'inviteUser',
@@ -108,7 +111,7 @@ menuActions="[
108
111
109
112
(4) `textMessages` can be used to replace default texts. Ex:
110
113
111
-
```html
114
+
```javascript
112
115
textMessages="{
113
116
MESSAGE_DELETED: 'Ce message a été supprimé',
114
117
MESSAGES_EMPTY: 'Aucun message',
@@ -118,13 +121,51 @@ textMessages="{
118
121
}"
119
122
```
120
123
124
+
(5) `theme` can be used to change the chat theme. Currently, only `light` and `dark` are available.
125
+
126
+
(6) `colors` can be use to create your own theme. Ex:
127
+
128
+
```javascript
129
+
colors="{
130
+
headerBg: '#fff',
131
+
sidemenuBg: '#fff',
132
+
sidemenuBgHover: '#f6f6f6',
133
+
sidemenuBgActive: '#e5effa',
134
+
sidemenuColorActive: '#1976d2',
135
+
menuBg: '#fff',
136
+
menuBgHover: '#f6f6f6',
137
+
messagesBg: '#f8f9fa',
138
+
textColorDark: '#0a0a0a',
139
+
textColor: '#0a0a0a',
140
+
inputBg: '#fff',
141
+
iconsColor: {
142
+
search: '#9ca6af',
143
+
add: '#1976d2',
144
+
menu: '#0a0a0a',
145
+
close: '#9ca6af',
146
+
closeImage: '#fff',
147
+
file: '#1976d2',
148
+
paperclip: '#1976d2',
149
+
closeOutline: '#1976d2',
150
+
send: '#1976d2',
151
+
sendDisabled: '#9ca6af',
152
+
emoji: '#1976d2',
153
+
document: '#1976d2',
154
+
pencil: '#1976d2',
155
+
pencilEdited: '#9e9e9e',
156
+
trash: '#f44336',
157
+
checkmark: '#0696c7'
158
+
}
159
+
}"
160
+
```
161
+
121
162
## Props data structure
122
163
123
164
Your props must follow a specific structure to display rooms and messages correctly:
124
165
125
166
### Rooms prop
126
167
127
-
```html
168
+
```javascript
128
169
rooms="[
129
170
{
130
171
roomId: 1,
@@ -148,7 +189,7 @@ rooms="[
148
189
Message objects are rendered differently depending on their type. Currently, only text, emoji and file types are supported.<br>
149
190
Each message object has a `sender_id` field which can have the value 'me' or the id of the corresponding agent.
0 commit comments