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

Function Message

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected