Back to Experiments
Code Block
Syntax-highlighted code display with optional line numbers
Primitives:CodeBlock
Example Componenttypescript
1 import { TextMessage } from '@/components/primitives'; 2 3 interface Props { 4 message: string; 5 variant?: 'default' | 'success' | 'error'; 6 } 7 8 export function AgentMessage({ message, variant = 'default' }: Props) { 9 const intent = { 10 type: 'TextMessage', 11 content: message, 12 variant, 13 }; 14 15 return <TextMessage intent={intent} />; 16 }