Chatwoot/app/javascript/widget/components/UserMessage.vue
Pranav Raj S a3662091c7 Add an intermediate pending state for widget messages (#323)
* Add an intermediate pending state for widget messages

* Remove unnecessary setTimeout

* Rename method
2019-11-29 17:42:35 +05:30

61 lines
1.2 KiB
Vue
Executable file

<template>
<div class="user-message">
<div class="message-wrap">
<UserMessageBubble :message="message" :status="status" />
</div>
</div>
</template>
<script>
import UserMessageBubble from 'widget/components/UserMessageBubble.vue';
export default {
name: 'UserMessage',
components: {
UserMessageBubble,
},
props: {
avatarUrl: String,
message: String,
status: {
type: String,
default: '',
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
@import '~widget/assets/scss/variables.scss';
.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;
& + .user-message {
margin-bottom: $space-micro;
.chat-bubble {
border-top-right-radius: $space-smaller;
}
.user-avatar {
visibility: hidden;
}
.agent-name {
display: none;
}
}
& + .agent-message {
margin-top: $space-normal;
}
.message-wrap {
margin-right: $space-small;
}
}
}
</style>