[Enhancement] Format messages in widget (#268)

* Use message formatter in widget

* Rename the variable
This commit is contained in:
Pranav Raj S
2019-11-24 00:29:55 +05:30
committed by Sony Mathew
parent c96e2c334c
commit c6feea9f6d
6 changed files with 66 additions and 17 deletions

View File

@@ -1,12 +1,13 @@
<template>
<div class="chat-bubble user">
{{ message }}
</div>
<div class="chat-bubble user" v-html="formatMessage(message)"></div>
</template>
<script>
import messageFormatterMixin from 'shared/mixins/messageFormatterMixin';
export default {
name: 'UserMessageBubble',
mixins: [messageFormatterMixin],
props: {
message: String,
},
@@ -28,6 +29,11 @@ export default {
line-height: 1.5;
max-width: 80%;
padding: $space-small $space-two;
text-align: left;
a {
color: $color-white;
}
&.user {
border-bottom-right-radius: $space-smaller;