simple-table-core 0.1.9 → 0.2.1

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 CHANGED
@@ -4,6 +4,39 @@ Simple Table is a React grid package designed to provide a flexible and easy-to-
4
4
 
5
5
  ![Simple Table Example](assets/table-example.png)
6
6
 
7
+ ## Example Usage
8
+
9
+ ```tsx
10
+ import { SimpleTable } from "simple-table-core";
11
+ import "simple-table-core/dist/style.css";
12
+
13
+ export const SAMPLE_HEADERS: any[] = [
14
+ { label: "Product ID", accessor: "id", width: 150 },
15
+ { label: "Product Name", accessor: "productName", width: 200 },
16
+ { label: "Category", accessor: "category", width: 150 },
17
+ { label: "Quantity", accessor: "quantity", width: 100 },
18
+ ];
19
+
20
+ function App() {
21
+ return (
22
+ <SimpleTable
23
+ defaultHeaders={SAMPLE_HEADERS}
24
+ height="auto"
25
+ rows={[
26
+ {
27
+ id: 1,
28
+ productName: "Product 1",
29
+ category: "Category 1",
30
+ quantity: 10,
31
+ },
32
+ ]}
33
+ />
34
+ );
35
+ }
36
+ ```
37
+
38
+ Import the CSS file to apply the styles to your table.
39
+
7
40
  ## Props
8
41
 
9
42
  The Simple Table component accepts the following props:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simple-table-core",
3
- "version": "0.1.9",
3
+ "version": "0.2.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
File without changes