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

22 lines
566 B
React
Raw Normal View History

import React from 'react';
import classNames from 'classnames';
import RcInputNumber from 'rc-input-number';
2015-07-01 14:48:47 +08:00
export default class InputNumber extends React.Component {
2015-07-01 14:48:47 +08:00
render() {
2016-01-05 14:42:06 +08:00
const { className, size, ...other } = this.props;
const inputNumberClass = classNames({
'ant-input-number-lg': size === 'large',
'ant-input-number-sm': size === 'small',
[className]: !!className,
});
return <RcInputNumber className={inputNumberClass} {...other} />;
2015-07-01 14:48:47 +08:00
}
}
InputNumber.defaultProps = {
prefixCls: 'ant-input-number',
step: 1,
};