ant-design/components/steps/index.jsx

35 lines
810 B
React
Raw Normal View History

import React from 'react';
import Steps from 'rc-steps';
const AntSteps = React.createClass({
getDefaultProps() {
return {
2015-08-31 20:24:47 +08:00
prefixCls: 'ant-steps',
2015-07-08 15:53:51 +08:00
iconPrefix: 'ant',
size: 'default',
maxDescriptionWidth: 100,
current: 0
};
},
render() {
let maxDescriptionWidth = this.props.maxDescriptionWidth;
if (this.props.direction === 'vertical') {
maxDescriptionWidth = 'auto';
}
2015-09-01 17:43:08 +08:00
return (
<Steps size={this.props.size}
current={this.props.current}
direction={this.props.direction}
iconPrefix={this.props.iconPrefix}
maxDescriptionWidth={maxDescriptionWidth}
prefixCls={this.props.prefixCls}>
2015-09-01 17:43:08 +08:00
{this.props.children}
</Steps>
);
}
});
2015-09-01 17:43:08 +08:00
AntSteps.Step = Steps.Step;
2015-09-01 16:18:46 +08:00
export default AntSteps;