MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / SearchResultValue

Function SearchResultValue

app/components/SearchPalette.tsx:380–413  ·  view source on GitHub ↗
({
  isHighlighted,
  stringValue,
  matches,
  className,
  textSize,
}: {
  isHighlighted: boolean;
  stringValue: string;
  matches?: Array<Match>;
  className?: string;
  textSize?: "text-xs" | "text-sm" | "text-base" | "text-lg";
})

Source from the content-addressed store, hash-verified

378}
379
380function 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
415function createOutputForMatch(
416 stringValue: string,

Callers

nothing calls this directly

Calls 2

createOutputForMatchFunction · 0.85
classnamesFunction · 0.85

Tested by

no test coverage detected