feat: separate activity bubble

This commit is contained in:
Shivam Mishra
2024-11-27 18:35:09 +05:30
parent 0ae085ffbb
commit ee71d6d50f
2 changed files with 19 additions and 2 deletions
@@ -12,6 +12,7 @@ import {
import Avatar from 'next/avatar/Avatar.vue';
import TextBubble from './bubbles/Text.vue';
import ActivityBubble from './bubbles/Activity.vue';
import MessageError from './MessageError.vue';
import MessageMeta from './MessageMeta.vue';
@@ -200,7 +201,7 @@ provideMessageContext({
:class="[flexOrientationClass, shouldGroupWithNext ? 'mb-2' : 'mb-4']"
>
<div v-if="variant === MESSAGE_VARIANTS.ACTIVITY">
<TextBubble v-bind="props" :variant :orientation />
<ActivityBubble :content="content" />
</div>
<div
v-else
@@ -216,7 +217,7 @@ provideMessageContext({
>
<Avatar :name="sender ? sender.name : ''" src="" :size="24" />
</div>
<TextBubble v-bind="props" class="[grid-area:bubble]" />
<TextBubble :content="content" class="[grid-area:bubble]" />
<MessageError
v-if="contentAttributes.externalError"
class="[grid-area:meta]"
@@ -0,0 +1,16 @@
<script setup>
import BaseBubble from './Base.vue';
defineProps({
content: {
type: String,
required: true,
},
});
</script>
<template>
<BaseBubble>
<span v-html="content" />
</BaseBubble>
</template>