({
isHighlighted,
stringValue,
matches,
className,
textSize,
}: {
isHighlighted: boolean;
stringValue: string;
matches?: Array<Match>;
className?: string;
textSize?: "text-xs" | "text-sm" | "text-base" | "text-lg";
})
| 378 | } |
| 379 | |
| 380 | function SearchResultValue({ |
| 381 | isHighlighted, |
| 382 | stringValue, |
| 383 | matches, |
| 384 | className, |
| 385 | textSize, |
| 386 | }: { |
| 387 | isHighlighted: boolean; |
| 388 | stringValue: string; |
| 389 | matches?: Array<Match>; |
| 390 | className?: string; |
| 391 | textSize?: "text-xs" | "text-sm" | "text-base" | "text-lg"; |
| 392 | }) { |
| 393 | const output = createOutputForMatch( |
| 394 | stringValue, |
| 395 | isHighlighted, |
| 396 | textSize, |
| 397 | matches |
| 398 | ); |
| 399 | |
| 400 | return ( |
| 401 | <Body |
| 402 | className={ |
| 403 | className ?? |
| 404 | classnames( |
| 405 | "mr-2", |
| 406 | isHighlighted ? `text-white` : "text-slate-600 dark:text-slate-400" |
| 407 | ) |
| 408 | } |
| 409 | > |
| 410 | {output} |
| 411 | </Body> |
| 412 | ); |
| 413 | } |
| 414 | |
| 415 | function createOutputForMatch( |
| 416 | stringValue: string, |
nothing calls this directly
no test coverage detected