Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

MessageBubble.vue

25 lines516 Bytes

1<script setup lang="ts">
2defineProps<{
3 inProgress?: boolean
4 message: { content: string; isQuestion: boolean }
5}>()
6</script>
7​
8<template>
9 <div
10 class="flex"
11 :class="message.isQuestion ? 'justify-end' : 'justify-start'"
12 >
13 <div
14 class="max-w-[80%] rounded-lg p-3"
15 :class="
16 message.isQuestion
17 ? 'bg-blue-500 text-white'
18 : 'bg-gray-200 text-gray-800'
19 "
20 >
21 {{ message.content }}
22 {{ inProgress ? '...' : null }}
23 </div>
24 </div>
25</template>