1 | import * as React from 'react';
|
2 | import type { AnyObject } from '../_util/type';
|
3 | import type { DropdownProps } from '../dropdown';
|
4 | import type { BreadcrumbItemProps } from './BreadcrumbItem';
|
5 | export interface BreadcrumbItemType {
|
6 | key?: React.Key;
|
7 | |
8 |
|
9 |
|
10 | href?: string;
|
11 | |
12 |
|
13 |
|
14 | path?: string;
|
15 | title?: React.ReactNode;
|
16 | breadcrumbName?: string;
|
17 | menu?: BreadcrumbItemProps['menu'];
|
18 |
|
19 | overlay?: React.ReactNode;
|
20 | className?: string;
|
21 | dropdownProps?: DropdownProps;
|
22 | onClick?: React.MouseEventHandler<HTMLAnchorElement | HTMLSpanElement>;
|
23 |
|
24 | children?: Omit<BreadcrumbItemType, 'children'>[];
|
25 | }
|
26 | export interface BreadcrumbSeparatorType {
|
27 | type: 'separator';
|
28 | separator?: React.ReactNode;
|
29 | }
|
30 | export type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
|
31 | export type InternalRouteType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
|
32 | export interface BreadcrumbProps<T extends AnyObject = AnyObject> {
|
33 | prefixCls?: string;
|
34 | params?: T;
|
35 | separator?: React.ReactNode;
|
36 | style?: React.CSSProperties;
|
37 | className?: string;
|
38 | rootClassName?: string;
|
39 | children?: React.ReactNode;
|
40 |
|
41 | routes?: ItemType[];
|
42 | items?: ItemType[];
|
43 | itemRender?: (route: ItemType, params: T, routes: ItemType[], paths: string[]) => React.ReactNode;
|
44 | }
|
45 | declare const Breadcrumb: {
|
46 | <T extends AnyObject = AnyObject>(props: BreadcrumbProps<T>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
47 | Item: React.FC<BreadcrumbItemProps> & {
|
48 | __ANT_BREADCRUMB_ITEM: boolean;
|
49 | };
|
50 | Separator: React.FC<{
|
51 | children?: React.ReactNode;
|
52 | }> & {
|
53 | __ANT_BREADCRUMB_SEPARATOR: boolean;
|
54 | };
|
55 | displayName: string;
|
56 | };
|
57 | export default Breadcrumb;
|