/** * @license EUPL-1.2+ * Copyright Gemeente Amsterdam */ import type { AnchorHTMLAttributes, ElementType } from 'react'; export type TableOfContentsLinkProps = { /** * Whether the nested list is initially expanded. * Ignored when the parent `TableOfContents` is not `collapsible`, when there is no nested list, or when `expanded` is provided. * @default false */ readonly defaultExpanded?: boolean; /** * Whether the nested list is expanded. * When provided, the component is controlled and internal state is ignored. * Ignored when the parent `TableOfContents` is not `collapsible` or when there is no nested list. */ readonly expanded?: boolean; /** The text for the link. */ readonly label: string; /** * The React component or intrinsic element to use for the link. * Refs are forwarded only to a plain anchor (the default, or `linkComponent="a"`), not to any other `linkComponent`. */ readonly linkComponent?: ElementType; /** * Callback fired when the nested list is expanded or collapsed. Receives the new expanded state. * Ignored when the parent `TableOfContents` is not `collapsible` or when there is no nested list. */ readonly onToggle?: (expanded: boolean) => void; } & Readonly>; /** * A link to a section of the current page within a Table of Contents. * * @see {@link https://designsystem.amsterdam/?path=/docs/components-navigation-table-of-contents--docs Table of Contents docs at Amsterdam Design System} */ export declare const TableOfContentsLink: import("react").ForwardRefExoticComponent<{ /** * Whether the nested list is initially expanded. * Ignored when the parent `TableOfContents` is not `collapsible`, when there is no nested list, or when `expanded` is provided. * @default false */ readonly defaultExpanded?: boolean; /** * Whether the nested list is expanded. * When provided, the component is controlled and internal state is ignored. * Ignored when the parent `TableOfContents` is not `collapsible` or when there is no nested list. */ readonly expanded?: boolean; /** The text for the link. */ readonly label: string; /** * The React component or intrinsic element to use for the link. * Refs are forwarded only to a plain anchor (the default, or `linkComponent="a"`), not to any other `linkComponent`. */ readonly linkComponent?: ElementType; /** * Callback fired when the nested list is expanded or collapsed. Receives the new expanded state. * Ignored when the parent `TableOfContents` is not `collapsible` or when there is no nested list. */ readonly onToggle?: (expanded: boolean) => void; } & Readonly> & import("react").RefAttributes>;