UNPKG

1.1 kBTypeScriptView Raw
1/// <reference types="react" />
2
3import * as React from 'react';
4import CommonProps from '../util';
5
6export interface ProgressProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
7 /**
8 * 形态
9 */
10 shape?: 'circle' | 'line';
11
12 /**
13 * 尺寸
14 */
15 size?: 'small' | 'medium' | 'large';
16
17 /**
18 * 所占百分比
19 */
20 percent?: number;
21
22 /**
23 * 进度状态, 显示优先级: color > progressive > state
24 */
25 state?: 'normal' | 'success' | 'error';
26
27 /**
28 * 是否为色彩阶段变化模式, 显示优先级: color > progressive > state
29 */
30 progressive?: boolean;
31
32 /**
33 * 是否添加 Border(只适用于 Line Progress)
34 */
35 hasBorder?: boolean;
36
37 /**
38 * 文本渲染函数
39 */
40 textRender?: (percent: number, option: {}) => React.ReactNode;
41
42 /**
43 * 进度条颜色, 显示优先级: color > progressive > state
44 */
45 color?: string;
46
47 /**
48 * 背景色
49 */
50 backgroundColor?: string;
51}
52
53export default class Progress extends React.Component<ProgressProps, any> {}