Repository Public MIT
1import { cn } from "@/lib/utils";23interface UserMessageProps {4 question: string;5 index?: number;6 className?: string;7 compact?: boolean;8}910/** Message de l'utilisateur : titre de section bien visible, aligné avec la réponse. */11export function UserMessage({ question, index, className, compact }: UserMessageProps) {12 return (13 <div className={cn("flex items-start gap-3", className)} data-testid="user-message">14 <span className="mt-1 grid h-7 w-7 shrink-0 place-items-center rounded-full bg-foreground text-background text-[11px] font-bold tnum">15 {index != null ? index : "Q"}16 </span>17 <h2 className={cn("font-display font-bold tracking-tight text-foreground text-balance leading-snug", compact ? "text-[15px]" : "text-lg md:text-[1.35rem]")}>18 {question}19 </h2>20 </div>21 );22}23