@overdoser/react-toolkit 0.0.11 → 0.0.12

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.
@@ -61,6 +61,18 @@ export interface TableProps<T extends Record<string, unknown>> {
61
61
  style?: React.CSSProperties;
62
62
  /** Column key to use as React `key` per row. Falls back to row index. */
63
63
  rowKey?: keyof T & string;
64
+ /**
65
+ * Per-row class name. Pass a string to apply the same class to every row,
66
+ * or a function `(row, index) => className` to compute it dynamically (e.g.
67
+ * highlight rows matching a predicate). Returned `undefined` adds nothing.
68
+ */
69
+ rowClassName?: string | ((row: T, index: number) => string | undefined);
70
+ /**
71
+ * Per-row inline style. Pass a `CSSProperties` object to apply the same
72
+ * style to every row, or a function `(row, index) => style` to compute it
73
+ * dynamically. Returned `undefined` adds nothing.
74
+ */
75
+ rowStyle?: React.CSSProperties | ((row: T, index: number) => React.CSSProperties | undefined);
64
76
  /** Content rendered when `data` is empty. @default 'No data' */
65
77
  emptyMessage?: ReactNode;
66
78
  /** When provided, renders a paginator below the table. */
@@ -80,6 +92,6 @@ export interface TableProps<T extends Record<string, unknown>> {
80
92
  * page already sorted and sliced; pass `pagination.totalRows` so the
81
93
  * paginator can compute page count.
82
94
  */
83
- declare function TableInner<T extends Record<string, unknown>>({ data, columns, sortConfig: controlledSortConfig, onSort, multiSort, striped, hoverable, compact, className, style, rowKey, emptyMessage, pagination, classes, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
95
+ declare function TableInner<T extends Record<string, unknown>>({ data, columns, sortConfig: controlledSortConfig, onSort, multiSort, striped, hoverable, compact, className, style, rowKey, rowClassName, rowStyle, emptyMessage, pagination, classes, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
84
96
  export declare const Table: typeof TableInner;
85
97
  export {};