-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormUserDetails.js
More file actions
61 lines (56 loc) · 1.97 KB
/
Copy pathFormUserDetails.js
File metadata and controls
61 lines (56 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import React, { Component } from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import AppBar from 'material-ui/AppBar';
import TextField from 'material-ui/TextField';
import RaisedButton from 'material-ui/RaisedButton';
export class FormUserDetails extends Component {
continue = e => {
e.preventDefault();
this.props.nextStep();
}
render() {
// pull ot values from props
const { values, handleChange } = this.props;
return (
<MuiThemeProvider>
<React.Fragment>
<AppBar title="Enter User Details" />
<TextField
hintText="Your First Name"
floatingLabelText="First Name"
onChange={handleChange('firstName')}
defaultValue={values.firstname}
/>
<br/>
<TextField
hintText="Your Last Name"
floatingLabelText="Last Name"
onChange={handleChange('lastName')}
defaultValue={values.lastname}
/>
<br/>
<TextField
hintText="Your Email"
floatingLabelText="Email"
onChange={handleChange('email')}
defaultValue={values.email}
/>
<br/>
<RaisedButton
label="Continue"
primary={true}
style={styles.button}
onClick={this.continue}
/>
</React.Fragment>
</MuiThemeProvider>
);
}
}
// create a styles variable
const styles = {
button: {
margin: 15
}
}
export default FormUserDetails;