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

Message.svelte

19 lines463 Bytes

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