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

20 lines
493 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
}
return <InputNumber className={sizeClass} style={{width: 90}} {...this.props} />;
2015-07-01 14:48:47 +08:00
}
});