UNPKG

1.65 kBTypeScriptView Raw
1import * as React from 'react';
2import { OverridableComponent, OverrideProps } from '../OverridableComponent';
3
4export interface BreadcrumbsTypeMap<P = {}, D extends React.ElementType = 'nav'> {
5 props: P & {
6 /**
7 * The breadcrumb children.
8 */
9 children?: React.ReactNode;
10 /**
11 * Override the default label for the expand button.
12 *
13 * For localization purposes, you can use the provided [translations](/guides/localization/).
14 */
15 expandText?: string;
16 /**
17 * If max items is exceeded, the number of items to show after the ellipsis.
18 */
19 itemsAfterCollapse?: number;
20 /**
21 * If max items is exceeded, the number of items to show before the ellipsis.
22 */
23 itemsBeforeCollapse?: number;
24 /**
25 * Specifies the maximum number of breadcrumbs to display. When there are more
26 * than the maximum number, only the first `itemsBeforeCollapse` and last `itemsAfterCollapse`
27 * will be shown, with an ellipsis in between.
28 */
29 maxItems?: number;
30 /**
31 * Custom separator node.
32 */
33 separator?: React.ReactNode;
34 };
35 defaultComponent: D;
36 classKey: BreadcrumbsClassKey;
37}
38
39/**
40 *
41 * Demos:
42 *
43 * - [Breadcrumbs](https://mui.com/components/breadcrumbs/)
44 *
45 * API:
46 *
47 * - [Breadcrumbs API](https://mui.com/api/breadcrumbs/)
48 */
49declare const Breadcrumbs: OverridableComponent<BreadcrumbsTypeMap>;
50
51export type BreadcrumbsClassKey = 'root' | 'ol' | 'li' | 'separator';
52
53export type BreadcrumbsProps<
54 D extends React.ElementType = BreadcrumbsTypeMap['defaultComponent'],
55 P = {}
56> = OverrideProps<BreadcrumbsTypeMap<P, D>, D>;
57
58export default Breadcrumbs;