From e0d02b1990419a1e8bd5ba58de8c8ff32913482d Mon Sep 17 00:00:00 2001 From: ddcat1115 Date: Tue, 9 Aug 2016 15:04:02 +0800 Subject: [PATCH] refactor: ts Progress (#2640) --- components/index.tsx | 3 +++ components/progress/progress.tsx | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/components/index.tsx b/components/index.tsx index a8cc3f175b..591635b69f 100644 --- a/components/index.tsx +++ b/components/index.tsx @@ -40,6 +40,9 @@ export { Popconfirm }; import Popover from './popover'; export { Popover }; +import Progress from './progress'; +export { Progress }; + import Transfer from './transfer'; export { Transfer }; diff --git a/components/progress/progress.tsx b/components/progress/progress.tsx index 3163bf6532..cd6cd33a70 100644 --- a/components/progress/progress.tsx +++ b/components/progress/progress.tsx @@ -10,7 +10,21 @@ const statusColorMap = { success: '#87d068', }; -export default class Line extends React.Component { +export interface ProgressProps { + type?: 'line' | 'circle'; + percent?: number; + format?: (percent: number) => string; + status?: 'success' | 'active' | 'exception'; + showInfo?: boolean; + strokeWidth?: number; + width?: number; + style?: React.CSSProperties; +} + +export default class Progress extends React.Component { + static Line: any; + static Circle: any; + static defaultProps = { type: 'line', percent: 0,