presale-demo-pe
Version:
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
30 lines (25 loc) • 616 B
JavaScript
import React, { PropTypes } from 'react';
import './Input.css';
const Input = ({ name, type, disabled, onChange, onBlur }) => (
<div className="input">
<input
type={type}
name={name}
disabled={disabled || null}
onChange={onChange}
onBlur={onBlur}
className="input__field"
/>
</div>
);
Input.propTypes = {
name: PropTypes.string,
type: PropTypes.string,
disabled: PropTypes.bool,
onChange: PropTypes.func,
onBlur: PropTypes.func
};
Input.defaultProps = {
type: 'text'
};
export default Input;