Browse Source

refactor: ts Progress (#2640)

pull/2638/head
ddcat1115 8 years ago
committed by Benjy Cui
parent
commit
e0d02b1990
  1. 3
      components/index.tsx
  2. 16
      components/progress/progress.tsx

3
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 };

16
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<ProgressProps, any> {
static Line: any;
static Circle: any;
static defaultProps = {
type: 'line',
percent: 0,

Loading…
Cancel
Save