import { Flex } from 'antd'; import classNames from 'classnames'; import { get } from 'lodash'; import { Handle, NodeProps, Position } from 'reactflow'; import { useGetComponentLabelByValue } from '../../hooks'; import { IGenerateParameter, NodeData } from '../../interface'; import { LeftHandleStyle, RightHandleStyle } from './handle-icon'; import NodeHeader from './node-header'; import styles from './index.less'; export function TemplateNode({ id, data, isConnectable = true, selected, }: NodeProps) { const parameters: IGenerateParameter[] = get(data, 'form.parameters', []); const getLabel = useGetComponentLabelByValue(id); return (
{parameters.map((x) => ( {getLabel(x.component_id)} ))}
); }