Skip to content

Commit 35611ca

Browse files
committed
Merge branch 'master' of github.com:mattmezza/vue-beautiful-chat
2 parents f105fa8 + a583ad0 commit 35611ca

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import Chat from 'vue-beautiful-chat'
4040
Vue.use(Chat)
4141
```
4242

43-
```html
43+
```vue
4444
<template>
4545
<div>
4646
<beautiful-chat
@@ -200,7 +200,7 @@ For more detailed examples see the demo folder.
200200

201201
Replacing default header.
202202

203-
``` html
203+
```vue
204204
<template v-slot:header>
205205
🤔 Good chat between {{participants.map(m=>m.name).join(' & ')}}
206206
</template>
@@ -211,7 +211,7 @@ Replacing default header.
211211
Replacing user avatar.
212212
Params: `message`, `user`
213213

214-
``` html
214+
```vue
215215
<template v-slot:user-avatar="{ message, user }">
216216
<div style="border-radius:50%; color: pink; font-size: 15px; line-height:25px; text-align:center;background: tomato; width: 25px !important; height: 25px !important; min-width: 30px;min-height: 30px;margin: 5px; font-weight:bold" v-if="message.type === 'text' && user && user.name">
217217
{{user.name.toUpperCase()[0]}}
@@ -224,7 +224,7 @@ Params: `message`, `user`
224224
Change markdown for text message.
225225
Params: `message`
226226

227-
``` html
227+
```vue
228228
<template v-slot:text-message-body="{ message }">
229229
<small style="background:red" v-if="message.meta">
230230
{{message.meta}}
@@ -238,7 +238,7 @@ Params: `message`
238238
Change markdown for system message.
239239
Params: `message`
240240

241-
``` html
241+
```vue
242242
<template v-slot:system-message-body="{ message }">
243243
[System]: {{message.text}}
244244
</template>
@@ -248,7 +248,7 @@ Params: `message`
248248

249249
Message objects are rendered differently depending on their type. Currently, only text, emoji and file types are supported. Each message object has an `author` field which can have the value 'me' or the id of the corresponding agent.
250250

251-
``` javascript
251+
```javascript
252252
{
253253
author: 'support',
254254
type: 'text',
@@ -282,7 +282,6 @@ Message objects are rendered differently depending on their type. Currently, onl
282282
}
283283
}
284284
}
285-
286285
```
287286

288287

@@ -346,7 +345,6 @@ yarn dev # this starts the dev server at http://localhost:8080
346345
- When initializing the component, pass an object specifying the colors used:
347346

348347
```javascript
349-
350348
let redColors = {
351349
header: {
352350
bg: '#D32F2F',
@@ -371,10 +369,12 @@ let redColors = {
371369
text: '#212121'
372370
}
373371
}
372+
```
374373

374+
```vue
375375
<beautiful-chat
376-
...
377-
:colors="redColors" />
376+
...
377+
:colors="redColors" />
378378
```
379379

380380
This is the red variant. Please check [this file](https://github.com/mattmezza/vue-beautiful-chat/tree/master/demo/src/colors.js) for the list of variants shown in the demo page online.

0 commit comments

Comments
 (0)