MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / WorkflowNode

Function WorkflowNode

src/components/workflow-node.tsx:17–56  ·  view source on GitHub ↗
({
  children,
  showToolbar = true,
  onDelete,
  onSettings,
  name,
  description,
}: WorkflowNodeProps)

Source from the content-addressed store, hash-verified

15};
16
17export function WorkflowNode({
18 children,
19 showToolbar = true,
20 onDelete,
21 onSettings,
22 name,
23 description,
24}: WorkflowNodeProps) {
25 return (
26 <>
27 {showToolbar && (
28 <NodeToolbar>
29 <Button size="sm" variant="ghost" onClick={onSettings}>
30 <SettingsIcon className="size-4" />
31 </Button>
32 <Button size="sm" variant="ghost" onClick={onDelete}>
33 <TrashIcon className="size-4" />
34 </Button>
35 </NodeToolbar>
36 )}
37 {children}
38 {name && (
39 <NodeToolbar
40 position={Position.Bottom}
41 isVisible
42 className="max-w-[200px] text-center"
43 >
44 <p className="font-medium">
45 {name}
46 </p>
47 {description && (
48 <p className="text-muted-foreground truncate text-sm">
49 {description}
50 </p>
51 )}
52 </NodeToolbar>
53 )}
54 </>
55 );
56};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected