2019-10-29 07:20:54 +00:00
|
|
|
<template>
|
|
|
|
<div class="user-message">
|
|
|
|
<div class="message-wrap">
|
2019-11-29 12:12:35 +00:00
|
|
|
<UserMessageBubble :message="message" :status="status" />
|
2019-10-29 07:20:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import UserMessageBubble from 'widget/components/UserMessageBubble.vue';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'UserMessage',
|
|
|
|
components: {
|
|
|
|
UserMessageBubble,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
avatarUrl: String,
|
2019-11-29 12:12:35 +00:00
|
|
|
message: String,
|
|
|
|
status: {
|
|
|
|
type: String,
|
|
|
|
default: '',
|
|
|
|
},
|
2019-10-29 07:20:54 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
2019-11-27 06:15:33 +00:00
|
|
|
<style lang="scss">
|
2019-10-29 07:20:54 +00:00
|
|
|
@import '~widget/assets/scss/variables.scss';
|
2019-11-27 06:15:33 +00:00
|
|
|
.conversation-wrap {
|
|
|
|
.user-message {
|
|
|
|
align-items: flex-end;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: flex-end;
|
|
|
|
margin: 0 $space-smaller $space-micro auto;
|
|
|
|
max-width: 85%;
|
|
|
|
text-align: right;
|
2019-10-29 07:20:54 +00:00
|
|
|
|
2019-11-27 06:15:33 +00:00
|
|
|
& + .user-message {
|
|
|
|
margin-bottom: $space-micro;
|
|
|
|
.chat-bubble {
|
|
|
|
border-top-right-radius: $space-smaller;
|
|
|
|
}
|
2019-10-29 07:20:54 +00:00
|
|
|
}
|
2019-11-27 06:15:33 +00:00
|
|
|
& + .agent-message {
|
|
|
|
margin-top: $space-normal;
|
2020-01-17 08:06:05 +00:00
|
|
|
margin-bottom: $space-micro;
|
2019-10-29 07:20:54 +00:00
|
|
|
}
|
2019-11-27 06:15:33 +00:00
|
|
|
.message-wrap {
|
|
|
|
margin-right: $space-small;
|
2019-10-29 07:20:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|