-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTable.js
49 lines (48 loc) · 1.72 KB
/
Table.js
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
import React, { Component } from 'react';
import './Form.css';
class Table extends Component {
constructor() {
super();
this.Add = this.Add.bind(this);
}
Add() {
this.props.Information(true);
}
render() {
return (
<div>
<div className="tbl">
<h1>Employee Information Table</h1>
<table className="Table">
<thead>
<tr className="column">
<td>FirstName</td>
<td>LastName</td>
<td>Email</td>
<td>Salary </td>
<td>JobStartDate</td>
</tr>
</thead>
<tbody>
{this.props.taking.map(item=> {
return (
<tr className="column">
<td className="">{item.FirstName}</td>
<td className="">{item.LastName}</td>
<td className="">{item.Email}</td>
<td className="">{item.Salary} </td>
<td className="">{item.JobStartDate}</td>
</tr>
)
}
)
}
</tbody>
</table>
<button className="btn btn-primary" id="btn1"onClick={this.Add}>Add Details</button>
</div>
</div>
);
}
}
export default Table;