import { ReactNode } from 'react'; import Box from './Box'; import { useDefaultLabelContext } from './contexts/DefaultLabelProvider'; import Heading from './Heading'; import styles from './TableOfContents.css'; import TableOfContentsItemList from './TableOfContents/TableOfContentsItemList'; import TableOfContentsItem from './TableOfContentsItem'; type Props = { /** * String that clients such as VoiceOver will read to describe the element. See [accessibility](https://gestalt.pinterest.systems/web/tableofcontents#Accessibility) section to learn more. */ accessibilityLabel?: string; /** * Title for the TableOfContents. See the [title variant](https://gestalt.pinterest.systems/web/tableofcontents#With-title) to learn more. */ title?: string; /** * Must be instances TableofContents.Item */ children: ReactNode; }; /** * [TableOfContents](https://gestalt.pinterest.systems/web/tableofcontents) component is used to navigate to anchors on a page. It also serves as an outline of a page’s content. TableOfContents is placed on the right side of the page, close to the main content block. *  *  */ export default function TableOfContents({ accessibilityLabel, title, children }: Props) { const { accessibilityLabel: accessibilityLabelDefault } = useDefaultLabelContext('TableOfContents'); return (
); } TableOfContents.Item = TableOfContentsItem; TableOfContents.displayName = 'TableOfContents';