index.js 518 B

12345678910111213141516
  1. import React from 'react';
  2. import './index.less';
  3. function InputItem(props) {
  4. const { className = '', size = 'basic', placeholder, disabled, radius, width, onChange } = props;
  5. return (
  6. <div
  7. style={{ width: width || '' }}
  8. className={`input ${className} ${size} ${disabled ? 'disabled' : ''} ${radius ? 'radius' : ''}`}
  9. >
  10. <input placeholder={placeholder} disabled={disabled} onChange={() => onChange && onChange()} />
  11. </div>
  12. );
  13. }
  14. InputItem.propTypes = {};
  15. export default InputItem;