import { ReactNode } from "react"; import { FootnoteSourcePreview, useFootnoteSourcePreview, } from "./FootnoteSourcePreview"; export function FootnoteItemLayout(props: { index: number; indexAction?: () => void; indexHref?: string; // When set, the index previews the footnote's source block on hover/tap. sourcePreview?: FootnoteSourcePreview; children: ReactNode; trailing?: ReactNode; id?: string; className?: string; }) { let { triggerProps, popover } = useFootnoteSourcePreview( props.sourcePreview, props.indexAction, ); let indexClassName = "text-tertiary font-medium shrink-0 text-sm leading-normal no-underline hover:underline cursor-pointer w-7 text-right"; let indexContent = <>{props.index}.; return (
{props.indexHref ? ( {indexContent} ) : ( )} {popover}
{props.children}
{props.trailing}
); } export function FootnoteSectionLayout(props: { children: ReactNode; className?: string; }) { return (

{props.children}
); }