/** * T038, T048-T049: Table of Contents component * Displays hierarchical list of document headings with smooth navigation */ import { ScrollArea } from '@/components/ui/scroll-area'; import { cn } from '@/lib/utils'; import type { Heading } from '@/hooks/useTableOfContents'; interface TableOfContentsProps { headings: Heading[]; onHeadingClick: (id: string) => void; } export function TableOfContents({ headings, onHeadingClick }: TableOfContentsProps) { // T049: Show empty state message when no headings if (headings.length === 0) { return (
No headings found
Add H1, H2, or H3 headings to your note