--- import { ScrollArea } from '@/components/ui/scroll-area' import { cn } from '@/lib/utils' import type { MarkdownHeading } from 'astro' import { Icon } from 'astro-icon/components' type Props = { headings: MarkdownHeading[] } const { headings } = Astro.props function getHeadingMargin(depth: number): string { const margins: Record = { 3: 'ml-4', 4: 'ml-8', 5: 'ml-12', 6: 'ml-16', } return margins[depth] || '' } ---
Table of Contents