import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons'; import { Button, Form, Input, Select } from 'antd'; import { useTranslation } from 'react-i18next'; import { FormCollapse } from '../components/dynamic-input-variable'; type DynamicOutputVariableProps = { name?: string; }; const options = [ 'String', 'Number', 'Boolean', 'Array[String]', 'Array[Number]', 'Object', ].map((x) => ({ label: x, value: x })); export const DynamicOutputVariable = ({ name = 'output', }: DynamicOutputVariableProps) => { const { t } = useTranslation(); return ( {(fields, { add, remove }) => ( <> {fields.map(({ key, name, ...restField }) => (
remove(name)} />
))} )}
); };