|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
import React from 'react';
|
|
|
import classNames from 'classnames';
|
|
|
|
|
|
import styles from './input.css';
|
|
|
|
|
|
const Input = props => {
|
|
|
const {small, range, ...componentProps} = props;
|
|
|
return (
|
|
|
<input
|
|
|
{...componentProps}
|
|
|
className={classNames(
|
|
|
styles.inputForm,
|
|
|
props.className,
|
|
|
{
|
|
|
[styles.inputSmall]: small && !range,
|
|
|
[styles.inputSmallRange]: small && range
|
|
|
}
|
|
|
)}
|
|
|
/>
|
|
|
);
|
|
|
};
|
|
|
|
|
|
Input.propTypes = {
|
|
|
className: PropTypes.string,
|
|
|
range: PropTypes.bool,
|
|
|
small: PropTypes.bool
|
|
|
};
|
|
|
|
|
|
Input.defaultProps = {
|
|
|
range: false,
|
|
|
small: false
|
|
|
};
|
|
|
|
|
|
export default Input;
|
|
|
|