Skip to content

Commit 1b0a065

Browse files
committed
Break TaskActions into two sections
1 parent 5541984 commit 1b0a065

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/components/shared/TaskDetails/Actions.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useState } from "react";
22
import { FaPython } from "react-icons/fa";
33

4+
import { BlockStack } from "@/components/ui/layout";
45
import useToastNotification from "@/hooks/useToastNotification";
56
import type { ComponentSpec } from "@/utils/componentSpec";
67
import { downloadYamlFromComponentText } from "@/utils/URL";
@@ -77,6 +78,7 @@ const TaskActions = ({
7778
notify(`Error deleting component`, "error");
7879
}
7980
};
81+
8082
const sharedActions: Action[] = [
8183
{
8284
label: "Download YAML",
@@ -109,11 +111,14 @@ const TaskActions = ({
109111
},
110112
];
111113

112-
const allActions: Action[] = [...customActions, ...sharedActions];
113-
114114
return (
115115
<>
116-
<ActionBlock actions={allActions} className={className} />
116+
<BlockStack gap="4" className={className}>
117+
<ActionBlock title="Component Actions" actions={sharedActions} />
118+
{customActions.length > 0 && (
119+
<ActionBlock title="Node Actions" actions={customActions} />
120+
)}
121+
</BlockStack>
117122

118123
{isEditDialogOpen && (
119124
<ComponentEditorDialog

0 commit comments

Comments
 (0)