mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-30 18:47:51 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			61 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Vue
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Vue
		
	
	
		
			Executable File
		
	
	
	
	
| <template>
 | |
|   <div
 | |
|     class="chat-bubble user"
 | |
|     :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: '',
 | |
|     },
 | |
|   },
 | |
| };
 | |
| </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;
 | |
| 
 | |
|   > a {
 | |
|     color: $color-primary;
 | |
|     word-break: break-all;
 | |
|   }
 | |
| 
 | |
|   &.user {
 | |
|     border-bottom-right-radius: $space-smaller;
 | |
| 
 | |
|     > a {
 | |
|       color: $color-white;
 | |
|     }
 | |
|   }
 | |
| }
 | |
| </style>
 | 
