import { DeleteOutlined, PlusOutlined } from '@ant-design/icons/lib' import { Button, Card, Checkbox, Form, Input, Popconfirm, Popover, Select, Space, Tabs, Tag } from 'antd' import { FormInstance } from 'antd/lib/form' import { TabPaneProps } from 'antd/lib/tabs' import { FieldData } from 'rc-field-form/lib/interface' import React, { useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' import { AdminFormFieldFragment } from '../../../graphql/fragment/admin.form.fragment' import { FieldCard } from './field.card' import { adminTypes } from './types' interface Props extends TabPaneProps { } export const HooksTab: React.FC = (props) => { const { t } = useTranslation() return ( {(hooks, { add, remove, move }) => { return (
{hooks.map((hook, index) => (
{t('form:hooks.enabled')} } type={'inner'} extra={
{ remove(index) }} >
} actions={[ remove(index)} />]} >
))}
) }}
) }