ant-design/components/input-number/index.jsx
Bruce Mitchener eaae43abdd More ES2015 classes.
This covers Carousel, InputNumber, Select, Slider, Switch, TreeSelect
and Tree.
2016-03-21 08:26:05 +07:00

22 lines
566 B
JavaScript

import React from 'react';
import classNames from 'classnames';
import RcInputNumber from 'rc-input-number';
export default class InputNumber extends React.Component {
render() {
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} />;
}
}
InputNumber.defaultProps = {
prefixCls: 'ant-input-number',
step: 1,
};