import type { FC, ReactElement, } from 'react' import { cloneElement, memo, } from 'react' import type { NodeProps } from 'reactflow' import { useWorkflowContext } from '../../context' import BlockIcon from '../../block-icon' import NextStep from './components/next-step' import { XClose } from '@/app/components/base/icons/src/vender/line/general' import { GitBranch01 } from '@/app/components/base/icons/src/vender/line/development' type BasePanelProps = { children: ReactElement } & Pick const BasePanel: FC = ({ id, data, children, }) => { const { handleSelectedNodeIdChange, selectedNode, } = useWorkflowContext() return (
{data.title}
handleSelectedNodeIdChange('')} >
Add description...
{cloneElement(children, { id, data })}
NEXT STEP
Add the next block in this workflow
) } export default memo(BasePanel)