import React from 'react'; import PropTypes from 'prop-types'; import BreadcrumbsContext from './BreadcrumbsContext'; import Item from './Item'; import { ComponentProps } from '../utils/types'; /** @public */ type BreadcrumbsClickHandler = (event: React.MouseEvent, data: { label?: string; to: string; }) => void; interface BreadcrumbsPropsBase { /** * `children` must be of type `Breadcrumbs.Item`. The last child will be marked as the current page. */ children: React.ReactElement[] | React.ReactElement; /** * A React ref which is set to the DOM element when the component mounts and null when it unmounts. */ elementRef?: React.Ref; /** * By default, the current page is a dimmed link. This prop changes this behavior by enabling the current page link. */ enableCurrentPage?: boolean; /** * An `onClick` handler for all Items. * The function takes the event and an options argument with `to` and `label`. */ onClick?: BreadcrumbsClickHandler; } type BreadcrumbsProps = ComponentProps; declare function Breadcrumbs({ children, elementRef, enableCurrentPage, onClick, ...otherProps }: BreadcrumbsProps): React.JSX.Element; declare namespace Breadcrumbs { var propTypes: { children: PropTypes.Validator>; elementRef: PropTypes.Requireable; enableCurrentPage: PropTypes.Requireable; onClick: PropTypes.Requireable<(...args: any[]) => any>; }; var Item: typeof import("./Item").default; } export default Breadcrumbs; export { Item, BreadcrumbsContext, BreadcrumbsClickHandler };