12 lines
314 B
TypeScript
12 lines
314 B
TypeScript
import React from 'react';
|
|
|
|
import type { InternalDocSearchHit, StoredDocSearchHit } from './types';
|
|
|
|
interface HitProps {
|
|
hit: InternalDocSearchHit | StoredDocSearchHit;
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export function Hit({ hit, children }: HitProps): JSX.Element {
|
|
return <a href={hit.url}>{children}</a>;
|
|
}
|