useItemRender.d.ts 670 B

12345678
  1. import * as React from 'react';
  2. import type { BreadcrumbProps, ItemType } from './Breadcrumb';
  3. type AddParameters<TFunction extends (...args: any) => any, TParameters extends [...args: any]> = (...args: [...Parameters<TFunction>, ...TParameters]) => ReturnType<TFunction>;
  4. type ItemRender = NonNullable<BreadcrumbProps['itemRender']>;
  5. type InternalItemRenderParams = AddParameters<ItemRender, [href?: string]>;
  6. export declare function renderItem(prefixCls: string, item: ItemType, children: React.ReactNode, href?: string): React.JSX.Element | null;
  7. export default function useItemRender(prefixCls: string, itemRender?: ItemRender): InternalItemRenderParams;
  8. export {};