MCPcopy Create free account
hub / github.com/TanStack/query / Message

Function Message

examples/react/chat/src/message.tsx:1–24  ·  view source on GitHub ↗
({
  inProgress,
  message,
}: {
  inProgress?: boolean
  message: { content: string; isQuestion: boolean }
})

Source from the content-addressed store, hash-verified

1export function Message({
2 inProgress,
3 message,
4}: {
5 inProgress?: boolean
6 message: { content: string; isQuestion: boolean }
7}) {
8 return (
9 <div
10 className={`flex ${message.isQuestion ? 'justify-end' : 'justify-start'}`}
11 >
12 <div
13 className={`max-w-[80%] rounded-lg p-3 ${
14 message.isQuestion
15 ? 'bg-blue-500 text-white'
16 : 'bg-gray-200 text-gray-800'
17 }`}
18 >
19 {message.content}
20 {inProgress ? '...' : null}
21 </div>
22 </div>
23 )
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected