UNPKG

2.04 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 PercentPositionType {
15 align?: 'start' | 'center' | 'end';
16 type?: 'inner' | 'outer';
17}
18export interface SuccessProps {
19 percent?: number;
20 /** @deprecated Use `percent` instead */
21 progress?: number;
22 strokeColor?: string;
23}
24export type ProgressAriaProps = Pick<React.AriaAttributes, 'aria-label' | 'aria-labelledby'>;
25export interface ProgressProps extends ProgressAriaProps {
26 prefixCls?: string;
27 className?: string;
28 rootClassName?: string;
29 type?: ProgressType;
30 percent?: number;
31 format?: (percent?: number, successPercent?: number) => React.ReactNode;
32 status?: (typeof ProgressStatuses)[number];
33 showInfo?: boolean;
34 strokeWidth?: number;
35 strokeLinecap?: 'butt' | 'square' | 'round';
36 strokeColor?: string | string[] | ProgressGradient;
37 trailColor?: string;
38 /** @deprecated Use `size` instead */
39 width?: number;
40 success?: SuccessProps;
41 style?: React.CSSProperties;
42 gapDegree?: number;
43 gapPosition?: 'top' | 'bottom' | 'left' | 'right';
44 size?: number | [number | string, number] | ProgressSize | {
45 width?: number;
46 height?: number;
47 };
48 steps?: number | {
49 count: number;
50 gap: number;
51 };
52 /** @deprecated Use `success` instead */
53 successPercent?: number;
54 percentPosition?: PercentPositionType;
55 children?: React.ReactNode;
56}
57declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
58export default Progress;