UNPKG

2.45 kBTypeScriptView Raw
1/// <reference types="react" />
2import { AbstractPureComponent2, Boundary, Props } from "../../common";
3import { OverflowListProps } from "../overflow-list/overflowList";
4import { IPopoverProps } from "../popover/popover";
5import { BreadcrumbProps } from "./breadcrumb";
6export declare type BreadcrumbsProps = IBreadcrumbsProps;
7/** @deprecated use BreadcrumbsProps */
8export interface IBreadcrumbsProps extends Props {
9 /**
10 * Callback invoked to render visible breadcrumbs. Best practice is to
11 * render a `<Breadcrumb>` element. If `currentBreadcrumbRenderer` is also
12 * supplied, that callback will be used for the current breadcrumb instead.
13 *
14 * @default Breadcrumb
15 */
16 breadcrumbRenderer?: (props: BreadcrumbProps) => JSX.Element;
17 /**
18 * Which direction the breadcrumbs should collapse from: start or end.
19 *
20 * @default Boundary.START
21 */
22 collapseFrom?: Boundary;
23 /**
24 * Callback invoked to render the current breadcrumb, which is the last
25 * element in the `items` array.
26 *
27 * If this prop is omitted, `breadcrumbRenderer` will be invoked for the
28 * current breadcrumb instead.
29 */
30 currentBreadcrumbRenderer?: (props: BreadcrumbProps) => JSX.Element;
31 /**
32 * All breadcrumbs to display. Breadcrumbs that do not fit in the container
33 * will be rendered in an overflow menu instead.
34 */
35 items: readonly BreadcrumbProps[];
36 /**
37 * The minimum number of visible breadcrumbs that should never collapse into
38 * the overflow menu, regardless of DOM dimensions.
39 *
40 * @default 0
41 */
42 minVisibleItems?: number;
43 /**
44 * Props to spread to `OverflowList`. Note that `items`,
45 * `overflowRenderer`, and `visibleItemRenderer` cannot be changed.
46 */
47 overflowListProps?: Partial<OverflowListProps<BreadcrumbProps>>;
48 /**
49 * Props to spread to the `Popover` showing the overflow menu.
50 */
51 popoverProps?: IPopoverProps;
52}
53/**
54 * Breadcrumbs component.
55 *
56 * @see https://blueprintjs.com/docs/#core/components/breadcrumbs
57 * @deprecated use { Breadcrumbs2 } from "@blueprintjs/popover2"
58 */
59export declare class Breadcrumbs extends AbstractPureComponent2<BreadcrumbsProps> {
60 static defaultProps: Partial<BreadcrumbsProps>;
61 render(): JSX.Element;
62 private renderOverflow;
63 private renderOverflowBreadcrumb;
64 private renderBreadcrumbWrapper;
65 private renderBreadcrumb;
66}