@yusufalperendumlu/component-library 0.1.4 → 0.1.5
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.d.ts
CHANGED
@@ -65,14 +65,15 @@ type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
65
65
|
|
66
66
|
declare const Input: React$1.FC<InputProps>;
|
67
67
|
|
68
|
+
interface TableColumn<T> {
|
69
|
+
key: keyof T;
|
70
|
+
label: string;
|
71
|
+
sortable?: boolean;
|
72
|
+
render?: (value: any, row: T) => React.ReactNode;
|
73
|
+
sortFn?: (a: T, b: T) => number;
|
74
|
+
}
|
68
75
|
interface TableProps<T> {
|
69
|
-
columns:
|
70
|
-
key: keyof T;
|
71
|
-
label: string;
|
72
|
-
sortable: boolean;
|
73
|
-
render?: (value: any, row: T) => React.ReactNode;
|
74
|
-
sortFn?: (a: T, b: T) => number;
|
75
|
-
}[];
|
76
|
+
columns: TableColumn<T>[];
|
76
77
|
data: T[];
|
77
78
|
onRowClick?: (row: T) => void;
|
78
79
|
className?: string;
|
package/package.json
CHANGED
@@ -7,16 +7,11 @@ export interface TableColumn<T> {
|
|
7
7
|
}
|
8
8
|
|
9
9
|
export interface TableProps<T> {
|
10
|
-
columns:
|
11
|
-
key: keyof T;
|
12
|
-
label: string;
|
13
|
-
sortable: boolean;
|
14
|
-
render?: (value: any, row: T) => React.ReactNode;
|
15
|
-
sortFn?: (a: T, b: T) => number;
|
16
|
-
}[];
|
10
|
+
columns: TableColumn<T>[];
|
17
11
|
data: T[];
|
18
12
|
onRowClick?: (row: T) => void;
|
19
13
|
className?: string;
|
20
14
|
selectedRowId?: string | number | null;
|
21
|
-
rowIdKey?: keyof T;
|
15
|
+
rowIdKey?: keyof T;
|
22
16
|
}
|
17
|
+
|