import { ReactElement } from 'react'; import { AnchorItemData } from './AnchorItem'; export interface AnchorPropsWithAnchors { /** * ```tsx * interface AnchorItemData { * autoScrollTo?: boolean; * children?: AnchorItemData[]; * disabled?: boolean; * href: string; * id: string; * name: string; * onClick?: VoidFunction; * title?: string; * } * ``` */ anchors: AnchorItemData[]; children?: never; } export interface AnchorPropsWithChildren { anchors?: never; /** * Whether to enable smooth scrolling to the target element when clicked. */ autoScrollTo?: boolean; /** * Use nested `` components to create hierarchical navigation.
* Only accepts `` components and text content as children.
* ```tsx * * ACR 1 * * anchor 2 * ACR 2-1 * ACR 2-2 * * * ``` */ children: string | ReactElement | Array>; /** * Whether the anchor is disabled.
* If parent anchor is disabled, all its children will be disabled too.
*/ disabled?: boolean; /** * Required when used as child component. */ href?: string; /** * Trigger when user click on any anchor. */ onClick?: VoidFunction; title?: string; } export type AnchorProps = AnchorPropsWithAnchors | AnchorPropsWithChildren; /** * The `mezzanine` Anchor component provides navigation menu for page sections with automatic hash tracking. * Nested structure supports up to 3 levels; deeper levels will be ignored. */ declare function Anchor(props: AnchorProps): import("react/jsx-runtime").JSX.Element; export default Anchor;