UNPKG

1.83 kBTypeScriptView Raw
1import * as React from 'react';
2export declare const ProgressTypes: readonly ["line", "circle", "dashboard"];
3export type ProgressType = (typeof ProgressTypes)[number];
4declare const ProgressStatuses: readonly ["normal", "exception", "active", "success"];
5export type ProgressSize = 'default' | 'small';
6export type StringGradients = Record<string, string>;
7type FromToGradients = {
8 from: string;
9 to: string;
10};
11export type ProgressGradient = {
12 direction?: string;
13} & (StringGradients | FromToGradients);
14export interface SuccessProps {
15 percent?: number;
16 /** @deprecated Use `percent` instead */
17 progress?: number;
18 strokeColor?: string;
19}
20export type ProgressAriaProps = Pick<React.AriaAttributes, 'aria-label' | 'aria-labelledby'>;
21export interface ProgressProps extends ProgressAriaProps {
22 prefixCls?: string;
23 className?: string;
24 rootClassName?: string;
25 type?: ProgressType;
26 percent?: number;
27 format?: (percent?: number, successPercent?: number) => React.ReactNode;
28 status?: (typeof ProgressStatuses)[number];
29 showInfo?: boolean;
30 strokeWidth?: number;
31 strokeLinecap?: 'butt' | 'square' | 'round';
32 strokeColor?: string | string[] | ProgressGradient;
33 trailColor?: string;
34 /** @deprecated Use `size` instead */
35 width?: number;
36 success?: SuccessProps;
37 style?: React.CSSProperties;
38 gapDegree?: number;
39 gapPosition?: 'top' | 'bottom' | 'left' | 'right';
40 size?: number | [number | string, number] | ProgressSize;
41 steps?: number | {
42 count: number;
43 gap: number;
44 };
45 /** @deprecated Use `success` instead */
46 successPercent?: number;
47 children?: React.ReactNode;
48}
49declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
50export default Progress;