react-hrnet-table-gandrica 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,18 +27,14 @@ Run the following command in your terminal to install the package via NPM:
|
|
|
27
27
|
npm install react-hrnet-table-gandrica
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
💻 Usage & ImplementationHere is how to import and use the
|
|
30
|
+
💻 Usage & ImplementationHere is how to import and use the Table in your React application (like HRNet).
|
|
31
31
|
|
|
32
|
-
1.
|
|
33
|
-
2. import
|
|
34
|
-
3.
|
|
35
|
-
4. Pass the list and tableHeaders props:JavaScript
|
|
36
|
-
5. import React from 'react';
|
|
37
|
-
import { Table } from 'react-hrnet-table-[votre-pseudo]';
|
|
38
|
-
import 'react-hrnet-table-[votre-pseudo]/style.css';
|
|
32
|
+
1. import { Table } from 'react-hrnet-table-gandrica';
|
|
33
|
+
2. import "react-hrnet-table-gandrica/style.css"; // Don't forget the styles!
|
|
34
|
+
3. Pass the list and tableHeaders as props Ex: '<Table list={list} tableHeaders={tableHeaders}/>'
|
|
39
35
|
|
|
40
36
|
export default function EmployeeList() {
|
|
41
|
-
// 1. The
|
|
37
|
+
// 1. The list array
|
|
42
38
|
const employeeList = [
|
|
43
39
|
{
|
|
44
40
|
firstName: "John",
|
|
@@ -75,7 +71,7 @@ zipCode: "60601",
|
|
|
75
71
|
},
|
|
76
72
|
];
|
|
77
73
|
|
|
78
|
-
// 2. The columns configuration (
|
|
74
|
+
// 2. The columns configuration ("First Name" = Header, firstName = data key)
|
|
79
75
|
const columns = [
|
|
80
76
|
{ firstName: "First Name" },
|
|
81
77
|
{ lastName: "Last Name" },
|