diff --git a/src/app/editor/[projectId]/FlowchartEditor.tsx b/src/app/editor/[projectId]/FlowchartEditor.tsx index 196d64b..81227b5 100644 --- a/src/app/editor/[projectId]/FlowchartEditor.tsx +++ b/src/app/editor/[projectId]/FlowchartEditor.tsx @@ -13,6 +13,7 @@ import ReactFlow, { Edge, } from 'reactflow' import 'reactflow/dist/style.css' +import Toolbar from '@/components/editor/Toolbar' import type { FlowchartData, FlowchartNode, FlowchartEdge } from '@/types/flowchart' type FlowchartEditorProps = { @@ -57,19 +58,54 @@ export default function FlowchartEditor({ [setEdges] ) + // Placeholder handlers - functionality will be added in future stories + const handleAddDialogue = useCallback(() => { + // TODO: Implement in US-021 + }, []) + + const handleAddChoice = useCallback(() => { + // TODO: Implement in US-023 + }, []) + + const handleAddVariable = useCallback(() => { + // TODO: Implement in US-026 + }, []) + + const handleSave = useCallback(() => { + // TODO: Implement in US-034 + }, []) + + const handleExport = useCallback(() => { + // TODO: Implement in US-035 + }, []) + + const handleImport = useCallback(() => { + // TODO: Implement in US-036 + }, []) + return ( -
- - - - +
+ +
+ + + + +
) } diff --git a/src/components/editor/Toolbar.tsx b/src/components/editor/Toolbar.tsx new file mode 100644 index 0000000..08f0243 --- /dev/null +++ b/src/components/editor/Toolbar.tsx @@ -0,0 +1,68 @@ +'use client' + +type ToolbarProps = { + onAddDialogue: () => void + onAddChoice: () => void + onAddVariable: () => void + onSave: () => void + onExport: () => void + onImport: () => void +} + +export default function Toolbar({ + onAddDialogue, + onAddChoice, + onAddVariable, + onSave, + onExport, + onImport, +}: ToolbarProps) { + return ( +
+
+ + Add Node: + + + + +
+ +
+ + + +
+
+ ) +}