// https://github.com/TypeStrong/typedoc-default-themes/blob/master/src/default/partials/breadcrumb.hbs import Link from '@docusaurus/Link'; import { useReflection } from '../hooks/useReflection'; import type { TSDReflection } from '../types'; export interface BreadcrumbProps { reflection: TSDReflection; root?: boolean; } export function Breadcrumb({ reflection, root = true }: BreadcrumbProps) { const parent = useReflection(reflection.parentId); let content: React.ReactNode = null; if (parent) { content = ( <>
  • {reflection.permalink ? ( {reflection.name} ) : ( {reflection.name} )}
  • ); } else if (reflection.permalink) { content = (
  • {reflection.name}
  • ); } else { return null; } return root ? : <>{content}; }