mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-25 06:04:54 +00:00
19 lines
687 B
TypeScript
19 lines
687 B
TypeScript
import { PageRenderer } from '@/lib/json-ui/page-renderer'
|
|
import workflowDesignerSchema from '@/config/pages/workflow-designer.json'
|
|
import { PageSchema } from '@/types/json-ui'
|
|
|
|
interface JSONWorkflowDesignerProps {
|
|
workflows: any[]
|
|
onWorkflowsChange: (updater: (workflows: any[]) => any[]) => void
|
|
}
|
|
|
|
export function JSONWorkflowDesigner({ workflows, onWorkflowsChange }: JSONWorkflowDesignerProps) {
|
|
const schema = workflowDesignerSchema as PageSchema
|
|
|
|
const handleCustomAction = async (action: any, event?: any) => {
|
|
console.log('[JSONWorkflowDesigner] Custom action:', action, event)
|
|
}
|
|
|
|
return <PageRenderer schema={schema} onCustomAction={handleCustomAction} />
|
|
}
|