@stereopt/data-table 0.1.2 → 0.1.3

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/dist/index.cjs CHANGED
@@ -25,10 +25,13 @@ __export(index_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(index_exports);
27
27
 
28
- // src/DataTable.tsx
28
+ // src/dataTable/DataTable.tsx
29
29
  var import_jsx_runtime = require("react/jsx-runtime");
30
- function DataTable() {
31
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Data Table" });
30
+ function DataTable({ data }) {
31
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
32
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { children: "Data Table" }),
33
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { children: JSON.stringify(data, null, 2) })
34
+ ] });
32
35
  }
33
36
  // Annotate the CommonJS export names for ESM import in node:
34
37
  0 && (module.exports = {
package/dist/index.d.cts CHANGED
@@ -1,5 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
 
3
- declare function DataTable(): react_jsx_runtime.JSX.Element;
3
+ interface DataTableProps<TData, TValue> {
4
+ data: TData[];
5
+ }
6
+ declare function DataTable<TData, TValue>({ data }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
4
7
 
5
- export { DataTable, DataTable as default };
8
+ export { DataTable, type DataTableProps, DataTable as default };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
 
3
- declare function DataTable(): react_jsx_runtime.JSX.Element;
3
+ interface DataTableProps<TData, TValue> {
4
+ data: TData[];
5
+ }
6
+ declare function DataTable<TData, TValue>({ data }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
4
7
 
5
- export { DataTable, DataTable as default };
8
+ export { DataTable, type DataTableProps, DataTable as default };
package/dist/index.js CHANGED
@@ -1,7 +1,10 @@
1
- // src/DataTable.tsx
2
- import { jsx } from "react/jsx-runtime";
3
- function DataTable() {
4
- return /* @__PURE__ */ jsx("div", { children: "Data Table" });
1
+ // src/dataTable/DataTable.tsx
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ function DataTable({ data }) {
4
+ return /* @__PURE__ */ jsxs("div", { children: [
5
+ /* @__PURE__ */ jsx("h1", { children: "Data Table" }),
6
+ /* @__PURE__ */ jsx("pre", { children: JSON.stringify(data, null, 2) })
7
+ ] });
5
8
  }
6
9
  export {
7
10
  DataTable,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stereopt/data-table",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Simple reusable React data table component",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",