UNPKG

1.17 kBTypeScriptView Raw
1import * as React from "react";
2import { BoxProps } from "../Box";
3import * as StyledSystem from "styled-system";
4import { LinkProps } from "../Link";
5
6interface IBreadcrumb {
7 children?: React.ReactNode;
8 /**
9 * The visual separator between each breadcrumb item
10 */
11 separator?: string | React.ReactNode;
12 /**
13 * If `true`, the breadcrumb will add the separator automatically
14 */
15 addSeparator?: boolean;
16 /**
17 * The left and right margin applied to the separator
18 */
19 spacing?: StyledSystem.MarginProps["margin"];
20}
21
22type BreadcrumbProps = BoxProps & IBreadcrumb;
23declare const Breadcrumb: React.FC<BreadcrumbProps>;
24export default Breadcrumb;
25
26/////////////////////////////////////////////////////////////
27
28export const BreadcrumbSeparator: React.FC<BoxProps>;
29export const BreadcrumbLink: React.FC<LinkProps>;
30
31/////////////////////////////////////////////////////////////
32
33export type BreadcrumbItemProps = BreadcrumbProps & {
34 /**
35 * If `true`, indicates that the breadcrumb item is active, adds
36 * `aria-current=page` and renders a `span`
37 */
38 isCurrentPage?: boolean;
39};
40
41export const BreadcrumbItem: React.FC<BreadcrumbItemProps>;