UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

60 lines (59 loc) 1.95 kB
import { ReactNodeOrFunction } from "../../utils/index.types.js"; import { HTMLProps, PropGetter } from "../../core/components/index.types.js"; import "../../core/index.js"; import * as react37 from "react"; import { ReactElement, ReactNode } from "react"; //#region src/components/breadcrumb/use-breadcrumb.d.ts interface BreadcrumbItem extends HTMLProps<"a"> { currentPage?: boolean; label?: ReactNode; } interface UseBreadcrumbProps extends HTMLProps<"nav"> { /** * The icon to be used in the ellipsis. */ ellipsis?: ReactNodeOrFunction<{ items: BreadcrumbItem[]; }>; /** * Number of elements visible on the end(right) edges. * * @default 0 */ endBoundaries?: number; /** * If provided, generate breadcrumb items based on items. */ items?: BreadcrumbItem[]; /** * The component to be used for the link. */ link?: ReactElement<any>; /** * Number of elements visible on the start(left) edges. * * @default 0 */ startBoundaries?: number; } declare const useBreadcrumb: ({ children, ellipsis, endBoundaries, items, link, startBoundaries, ...rest }?: UseBreadcrumbProps) => { children: (string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react37.ReactPortal | ReactElement<unknown, string | react37.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | ReactElement<any, string | react37.JSXElementConstructor<any>> | null | undefined)[]; getEllipsisProps: PropGetter<"svg", undefined, undefined>; getLinkProps: PropGetter<"a", { currentPage?: boolean; }, undefined>; getListProps: PropGetter<"ol", undefined, undefined>; getRootProps: PropGetter<"nav", undefined, undefined>; }; type UseBreadcrumbReturn = ReturnType<typeof useBreadcrumb>; //#endregion export { BreadcrumbItem, UseBreadcrumbProps, UseBreadcrumbReturn, useBreadcrumb }; //# sourceMappingURL=use-breadcrumb.d.ts.map