next-helios-fe 1.7.12 → 1.7.13
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
@@ -43,6 +43,7 @@ interface TableProps {
|
|
43
43
|
customTool?: {
|
44
44
|
icon: string;
|
45
45
|
variant: "primary" | "secondary" | "success" | "warning" | "danger";
|
46
|
+
show?: boolean;
|
46
47
|
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
47
48
|
}[];
|
48
49
|
};
|
@@ -495,18 +496,20 @@ export const Table: TableComponentProps = ({
|
|
495
496
|
? "bg-danger hover:bg-danger-dark"
|
496
497
|
: "bg-primary hover:bg-primary-dark";
|
497
498
|
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
499
|
+
if (item.show !== false) {
|
500
|
+
return (
|
501
|
+
<button
|
502
|
+
key={index}
|
503
|
+
type="button"
|
504
|
+
className={`p-1.5 rounded-full text-white ${variant}`}
|
505
|
+
onClick={(e) => {
|
506
|
+
item.onClick && item.onClick(e);
|
507
|
+
}}
|
508
|
+
>
|
509
|
+
<Icon icon={item.icon} className="text-2xl" />
|
510
|
+
</button>
|
511
|
+
);
|
512
|
+
}
|
510
513
|
})}
|
511
514
|
{options?.toolbar?.addData?.show !== false && (
|
512
515
|
<button
|