import React from react import Button from react-bootstrap lib Button

 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
import React from "react";
import Button from "react-bootstrap/lib/Button";
import Form from "react-bootstrap/lib/Form";
function Registration(props) {
return (
<Form>
<Form.Row>
<Form.Group controlId="formGridEmail">
<Form.Label>Enter your email</Form.Label>
<Form.Control
onChange={e => props.getUserEmail(e.target.value)}
type="email" placeholder="Enter email" />
</Form.Group>
<Form.Group controlId="formGridPassword">
<Form.Label>Enter your password</Form.Label>
<Form.Control
onChange={e => props.getUserPass(e.target.value)}
type="password" placeholder="Password" />
</Form.Group>
</Form.Row>
<Form.Group controlId="formGridFirstName">
<Form.Label>Enter your first name</Form.Label>
<Form.Control placeholder="firstname"
onChange={e => props.getUserFirstName(e.target.value)}
/>
</Form.Group>
<Form.Group controlId="formSecondName">
<Form.Label> Enter your second name</Form.Label>
<Form.Control placeholder="Second name" onChange={e => props.getUserSecondName(e.target.value)}
/>
</Form.Group>
<Button variant="outline-success"
className="button"
onClick={() =>
props.createUser(
props.email,
props.password,
props.firstName + "_" + props.secondName
)
}
>Registrate{" "}</Button>
</Form>
);
}
export default Registration;