progress.d.ts
2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import * as React from 'react';
import { ConfigConsumerProps } from '../config-provider';
declare const ProgressTypes: ["line", "circle", "dashboard"];
export declare type ProgressType = typeof ProgressTypes[number];
declare const ProgressStatuses: ["normal", "exception", "active", "success"];
export declare type ProgressSize = 'default' | 'small';
export declare type StringGradients = {
[percentage: string]: string;
};
declare type FromToGradients = {
from: string;
to: string;
};
export declare type ProgressGradient = {
direction?: string;
} & (StringGradients | FromToGradients);
export interface SuccessProps {
percent?: number;
/** @deprecated Use `percent` instead */
progress?: number;
strokeColor?: string;
}
export interface ProgressProps {
prefixCls?: string;
className?: string;
type?: ProgressType;
percent?: number;
format?: (percent?: number, successPercent?: number) => React.ReactNode;
status?: typeof ProgressStatuses[number];
showInfo?: boolean;
strokeWidth?: number;
strokeLinecap?: 'butt' | 'square' | 'round';
strokeColor?: string | ProgressGradient;
trailColor?: string;
width?: number;
success?: SuccessProps;
style?: React.CSSProperties;
gapDegree?: number;
gapPosition?: 'top' | 'bottom' | 'left' | 'right';
size?: ProgressSize;
steps?: number;
/** @deprecated Use `success` instead */
successPercent?: number;
}
export default class Progress extends React.Component<ProgressProps> {
static defaultProps: {
type: "circle" | "line" | "dashboard" | undefined;
percent: number;
showInfo: boolean;
trailColor: null;
size: "small" | "default" | undefined;
gapDegree: undefined;
strokeLinecap: "round" | "butt" | "square" | undefined;
};
getPercentNumber(): number;
getProgressStatus(): "success" | "normal" | "active" | "exception";
renderProcessInfo(prefixCls: string, progressStatus: typeof ProgressStatuses[number]): JSX.Element | null;
renderProgress: ({ getPrefixCls, direction }: ConfigConsumerProps) => JSX.Element;
render(): JSX.Element;
}
export {};