You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
929 B

import React from 'react';
import { classSet } from 'rc-util';
let AntSpin = React.createClass({
getDefaultProps() {
return {
size: 'default'
};
},
propTypes: {
className: React.PropTypes.string,
size: React.PropTypes.oneOf(['small', 'default', 'large'])
},
render() {
const prefix = 'ant-spin';
const {size, className, ...others} = this.props;
const sizeCls = ({
'large': 'lg',
'small': 'sm'
})[size] || '';
let componentClassName = classSet({
'ant-spin': true,
[`${prefix}-${sizeCls}`]: sizeCls,
[className]: !!className
});
return (
<div {...this.props} className={ componentClassName }>
<span className="ant-spin-dot ant-spin-dot-first" />
<span className="ant-spin-dot ant-spin-dot-second" />
<span className="ant-spin-dot ant-spin-dot-third" />
</div>
);
}
});
export default AntSpin;