* chore(deps): update react to 19 * fix: examples to show backwards compatibility with react 18 * fix: types * fix: eslint --------- Co-authored-by: Dylan Tientcheu <dylantientcheu@gmail.com>
12 lines
328 B
TypeScript
12 lines
328 B
TypeScript
import React, { type JSX } 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>;
|
|
}
|