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