ant-design/components/steps/index.tsx
Tyler 919cb22eb7 Use the prop-types package from npm instead of React.PropTypes (#6057)
* Use the prop-types package from npm instead of React.PropTypes

* Remove using of PropTypes from React in docs and site
2017-05-09 13:40:33 +08:00

36 lines
753 B
TypeScript

import React from 'react';
import PropTypes from 'prop-types';
import RcSteps from 'rc-steps';
export interface StepsProps {
prefixCls?: string;
iconPrefix?: string;
current?: number;
status?: 'wait' | 'process' | 'finish' | 'error';
size?: 'default' | 'small';
direction?: 'horizontal' | 'vertical';
progressDot?: boolean | Function;
}
export default class Steps extends React.Component<StepsProps, any> {
static Step = RcSteps.Step;
static defaultProps = {
prefixCls: 'ant-steps',
iconPrefix: 'ant',
current: 0,
};
static propTypes = {
prefixCls: PropTypes.string,
iconPrefix: PropTypes.string,
current: PropTypes.number,
};
render() {
return (
<RcSteps {...this.props} />
);
}
}