Chatwoot/app/javascript/widget/components/UserMessageBubble.vue

62 lines
1.1 KiB
Vue
Raw Normal View History

<template>
<div
class="chat-bubble user"
2020-03-30 06:45:06 +00:00
:style="{ background: widgetColor }"
v-html="formatMessage(message)"
/>
</template>
<script>
import messageFormatterMixin from 'shared/mixins/messageFormatterMixin';
export default {
name: 'UserMessageBubble',
mixins: [messageFormatterMixin],
props: {
message: {
type: String,
default: '',
},
status: {
type: String,
default: '',
},
widgetColor: {
type: String,
default: '',
2020-03-30 06:45:06 +00:00
},
},
};
</script>
<style lang="scss">
@import '~widget/assets/scss/variables.scss';
@import '~widget/assets/scss/mixins.scss';
.chat-bubble {
@include light-shadow;
background: $color-woot;
border-radius: $space-two;
color: $color-white;
display: inline-block;
font-size: $font-size-default;
line-height: 1.5;
padding: $space-slab $space-normal $space-slab $space-normal;
text-align: left;
word-break: break-word;
> a {
color: $color-primary;
2020-02-22 10:02:15 +00:00
word-break: break-all;
}
&.user {
border-bottom-right-radius: $space-smaller;
2020-02-22 10:02:15 +00:00
> a {
color: $color-white;
}
}
}
</style>