diff options
author | Anike Arni <anikarni@gmail.com> | 2017-02-21 18:39:06 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-21 18:39:06 -0300 |
commit | 92c6a9dbc39318df48b4b3d5fae1a3888f201343 (patch) | |
tree | 548fb92a6ae19d34945c19b2c704cc8c2c97382a /web-ui/src/common | |
parent | d5d7c8607138c8f39b55cdaa6ef3231c98d6af8a (diff) | |
parent | db1db55b806953ff93950b724fc96c8db388bbcf (diff) |
Merge pull request #986 from pixelated/login-errors
Translate and make login responsive
Diffstat (limited to 'web-ui/src/common')
-rw-r--r-- | web-ui/src/common/input_field/input_field.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/web-ui/src/common/input_field/input_field.js b/web-ui/src/common/input_field/input_field.js index 1378ba74..d4876d9f 100644 --- a/web-ui/src/common/input_field/input_field.js +++ b/web-ui/src/common/input_field/input_field.js @@ -19,16 +19,24 @@ import React from 'react'; import './input-field.scss'; -const InputField = ({ label, name }) => ( +const InputField = ({ label, name, type = 'text' }) => ( <div className='input-field-group'> - <input type='text' name={name} className='input-field' required /> + <input + type={type} name={name} className='input-field' + autoFocus='' required + /> <label className='input-field-label' htmlFor={name}>{label}</label> </div> ); InputField.propTypes = { label: React.PropTypes.string.isRequired, - name: React.PropTypes.string.isRequired + name: React.PropTypes.string.isRequired, + type: React.PropTypes.string +}; + +InputField.defaultProps = { + type: 'text' }; export default InputField; |