vasuzex 2.1.18 → 2.1.19
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.
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Eye, Edit2, Trash2 } from "lucide-react";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* ActionDefaults - Production Ready
|
|
5
5
|
*
|
|
6
6
|
* Default configurations for common DataTable actions
|
|
7
7
|
* Provides sensible defaults for edit, view, delete, and switch actions
|
|
8
|
+
* Uses lucide-react icons matching RowActionsCell design
|
|
8
9
|
*
|
|
9
10
|
* @module components/DataTable/ActionDefaults
|
|
10
11
|
*/
|
|
@@ -13,26 +14,26 @@ export const ACTION_DEFAULTS = {
|
|
|
13
14
|
edit: {
|
|
14
15
|
type: "link",
|
|
15
16
|
label: "Edit",
|
|
16
|
-
icon:
|
|
17
|
+
icon: Edit2,
|
|
17
18
|
title: "Edit",
|
|
18
19
|
extraClass:
|
|
19
|
-
"
|
|
20
|
+
"p-1.5 text-gray-600 hover:text-emerald-600 hover:bg-emerald-50 rounded-md transition-colors dark:text-gray-400 dark:hover:text-emerald-400 dark:hover:bg-emerald-950/30",
|
|
20
21
|
},
|
|
21
22
|
view: {
|
|
22
23
|
type: "button",
|
|
23
24
|
label: "View Details",
|
|
24
|
-
icon:
|
|
25
|
+
icon: Eye,
|
|
25
26
|
title: "View Details",
|
|
26
27
|
extraClass:
|
|
27
|
-
"
|
|
28
|
+
"p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-md transition-colors dark:text-gray-400 dark:hover:text-blue-400 dark:hover:bg-blue-950/30",
|
|
28
29
|
},
|
|
29
30
|
delete: {
|
|
30
31
|
type: "button",
|
|
31
32
|
label: "Delete",
|
|
32
|
-
icon:
|
|
33
|
+
icon: Trash2,
|
|
33
34
|
title: "Delete",
|
|
34
35
|
extraClass:
|
|
35
|
-
"
|
|
36
|
+
"p-1.5 text-gray-600 hover:text-rose-600 hover:bg-rose-50 rounded-md transition-colors dark:text-gray-400 dark:hover:text-rose-400 dark:hover:bg-rose-950/30",
|
|
36
37
|
},
|
|
37
38
|
switch: {
|
|
38
39
|
type: "button",
|
|
@@ -75,7 +75,7 @@ export function TableBody({
|
|
|
75
75
|
|
|
76
76
|
{/* Render Actions */}
|
|
77
77
|
{actions && (
|
|
78
|
-
<td className="px-
|
|
78
|
+
<td className="px-2 py-2 text-right">
|
|
79
79
|
<div className="flex items-center justify-end gap-2">
|
|
80
80
|
{actions.map((userAction, actionIdx) => {
|
|
81
81
|
// Check visibility first
|
|
@@ -146,7 +146,7 @@ export function TableBody({
|
|
|
146
146
|
const content = action.renderContent ? (
|
|
147
147
|
action.renderContent(row)
|
|
148
148
|
) : Icon ? (
|
|
149
|
-
<Icon className="h-
|
|
149
|
+
<Icon className="h-4 w-4" />
|
|
150
150
|
) : (
|
|
151
151
|
action.label
|
|
152
152
|
);
|