summaryrefslogtreecommitdiff
path: root/web-ui/src/common
diff options
context:
space:
mode:
authorAnike Arni <aarni@thoughtworks.com>2017-02-17 09:57:19 -0200
committerTulio Casagrande <tcasagra@thoughtworks.com>2017-02-21 13:32:05 -0300
commitbfd85dff6b086abae1c16014e318c89cba929b66 (patch)
tree787e103d678bea48a4122d8e190be3a2c5e0e767 /web-ui/src/common
parent0c5bbc3a1e104512172221851262b81602a44df8 (diff)
[#907] Makes login page responsive
Diffstat (limited to 'web-ui/src/common')
-rw-r--r--web-ui/src/common/input_field/input_field.js14
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;