@kanda-libs/ks-component-ts 0.2.229 → 0.2.230

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanda-libs/ks-component-ts",
3
- "version": "0.2.229",
3
+ "version": "0.2.230",
4
4
  "description": "Kanda form component library",
5
5
  "main": "dist/index.esm.js",
6
6
  "module": "dist/index.esm.js",
@@ -5,12 +5,14 @@ import Cell from "~/components/Table/Rows/Cell";
5
5
  import { StringIndexedObject } from "~/types";
6
6
  import PopoverButton from "~/components/Table/Rows/PopoverButton";
7
7
  import { TableRow } from "~/components/Table/types";
8
+ import clsx from "clsx";
8
9
 
9
10
  const Row: FunctionComponent<RowProps> = function ({
10
11
  row,
11
12
  hoverPopover,
12
13
  isLoading,
13
14
  compact = false,
15
+ rowClassName = "",
14
16
  ...props
15
17
  }) {
16
18
  const {
@@ -31,7 +33,10 @@ const Row: FunctionComponent<RowProps> = function ({
31
33
  {...rowProps}
32
34
  onMouseEnter={onMouseEnter}
33
35
  onMouseLeave={onMouseLeave}
34
- className={compact ? classNames.compact : classNames.base}
36
+ className={clsx(
37
+ compact ? classNames.compact : classNames.base,
38
+ rowClassName
39
+ )}
35
40
  >
36
41
  {cells.map((cell, index) => (
37
42
  <Cell
@@ -10,4 +10,5 @@ export interface RowProps {
10
10
  prepareRow: (row: Row) => void;
11
11
  hoverPopover: FunctionComponent<PopoverButtonHoverPopoverProps>;
12
12
  compact?: boolean;
13
+ rowClassName?: string;
13
14
  }
@@ -6,6 +6,7 @@ import Row from "~/components/Table/Rows/Row";
6
6
  export interface RowsProps extends Omit<RowProps, "row"> {
7
7
  rows: RowType[];
8
8
  compact?: boolean;
9
+ rowClassName?: string;
9
10
  }
10
11
 
11
12
  const Rows: FunctionComponent<RowsProps> = function ({ rows, ...rowProps }) {
@@ -9,6 +9,7 @@ import { Pagination } from "@kanda-libs/ks-design-library";
9
9
  const Table: FunctionComponent<TableProps> = function ({
10
10
  onRowClicked,
11
11
  compact = false,
12
+ rowClassName,
12
13
  ...props
13
14
  }) {
14
15
  const {
@@ -48,6 +49,7 @@ const Table: FunctionComponent<TableProps> = function ({
48
49
  hoverPopover={hoverPopover}
49
50
  onRowClicked={onRowClicked}
50
51
  compact={compact}
52
+ rowClassName={rowClassName}
51
53
  />
52
54
  </div>
53
55
  </div>
@@ -58,6 +58,7 @@ export interface TableProps {
58
58
  setPage: (page: number) => void;
59
59
  hoverPopover?: FunctionComponent<PopoverButtonHoverPopoverProps> | null;
60
60
  compact?: boolean;
61
+ rowClassName?: string;
61
62
  }
62
63
 
63
64
  export interface TableRow {