pouncejs
Version:
A collection of UI components from Panther labs
22 lines (21 loc) • 929 B
TypeScript
import React from 'react';
import { LinkProps } from '../Link';
export interface BreadcrumbItem {
/** The URL that this Breadcrumbs should navigate to when clicked */
href: string;
/** The react node that will be displayed on this particular Breadcrumb
* children can be: numbers, strings, elements or an array (or fragment) containing these types.
*/
children: React.ReactNode;
}
export interface BreadcrumbProps extends Pick<LinkProps, 'as'> {
/** A list of `BreadcrumbsItem` objects ( `{href,children}` ) that will construct the Breadcrumb */
items: BreadcrumbItem[];
/** Truncates component if breadcrumb list is too long.
* At least 4 breadcrumbs must exist for truncation to occur.
*/
truncate?: boolean;
}
/** Breadcrumb is a way to navigate back to where you came from within the app */
declare const Breadcrumbs: React.FC<BreadcrumbProps>;
export default Breadcrumbs;