Steps.d.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import React from 'react';
  2. import type { Icons, Status } from './interface';
  3. import type { StepProps } from './Step';
  4. export declare type StepIconRender = (info: {
  5. index: number;
  6. status: Status;
  7. title: React.ReactNode;
  8. description: React.ReactNode;
  9. node: React.ReactNode;
  10. }) => React.ReactNode;
  11. export declare type ProgressDotRender = (iconDot: any, info: {
  12. index: number;
  13. status: Status;
  14. title: React.ReactNode;
  15. description: React.ReactNode;
  16. }) => React.ReactNode;
  17. export interface StepsProps {
  18. prefixCls?: string;
  19. style?: React.CSSProperties;
  20. className?: string;
  21. children?: React.ReactNode;
  22. direction?: 'horizontal' | 'vertical';
  23. type?: 'default' | 'navigation' | 'inline';
  24. labelPlacement?: 'horizontal' | 'vertical';
  25. iconPrefix?: string;
  26. status?: Status;
  27. size?: 'default' | 'small';
  28. current?: number;
  29. progressDot?: ProgressDotRender | boolean;
  30. stepIcon?: StepIconRender;
  31. initial?: number;
  32. icons?: Icons;
  33. items?: StepProps[];
  34. itemRender?: (item: StepProps, stepItem: React.ReactElement) => React.ReactNode;
  35. onChange?: (current: number) => void;
  36. }
  37. declare function Steps(props: StepsProps): React.JSX.Element;
  38. declare namespace Steps {
  39. var Step: typeof import("./Step").default;
  40. }
  41. export default Steps;