ant-design/components/input-number/index.jsx

20 lines
473 B
React
Raw Normal View History

import InputNumber from 'rc-input-number';
import React from 'react';
2015-07-01 14:48:47 +08:00
export default React.createClass({
2015-07-01 14:48:47 +08:00
getDefaultProps() {
return {
prefixCls: 'ant-input-number'
};
},
render() {
2015-09-01 16:18:46 +08:00
let sizeClass = '';
2015-08-10 15:39:50 +08:00
if (this.props.size === 'large') {
sizeClass = 'ant-input-number-lg';
} else if (this.props.size === 'small') {
sizeClass = 'ant-input-number-sm';
2015-08-10 13:22:50 +08:00
}
2015-11-05 17:35:21 +08:00
return <InputNumber className={sizeClass} {...this.props} />;
2015-07-01 14:48:47 +08:00
}
});