@eqtylab/equality 1.2.0 → 1.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/dist/index.cjs CHANGED
@@ -2810,8 +2810,10 @@ var Table = ({
2810
2810
  rows,
2811
2811
  className,
2812
2812
  border = false,
2813
- elevation = ELEVATION.BASE
2813
+ elevation = ELEVATION.BASE,
2814
+ emptyState
2814
2815
  }) => {
2816
+ const isEmpty = rows.length === 0;
2815
2817
  return /* @__PURE__ */ jsxRuntime.jsx(
2816
2818
  "div",
2817
2819
  {
@@ -2823,7 +2825,7 @@ var Table = ({
2823
2825
  ),
2824
2826
  children: /* @__PURE__ */ jsxRuntime.jsxs(TableContainer, { elevation, children: [
2825
2827
  /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: column.className, children: column.content }, column.key)) }) }),
2826
- /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(
2828
+ isEmpty && emptyState ? /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: columns.length, className: styles51__default.default["table-empty-state"], children: emptyState }) }) }) : /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(
2827
2829
  TableRow,
2828
2830
  {
2829
2831
  className: cn(row.className, row.onClick && styles51__default.default["table-row-clickable"]),