UNPKG

@fakel/rest-admin

Version:

An application that makes it easier to work with your API

25 lines (24 loc) 1.13 kB
import React from 'react'; import { FieldConfig } from 'formik'; import { ArrayHelpers } from 'formik/dist/FieldArray'; declare type ActionsButtonType = 'add' | 'remove' | 'up' | 'down'; declare type ActionsPositionType = 'header' | 'body'; export interface InputsIteratorProps extends FieldConfig { children?: (props: any) => any; direction?: 'vertical' | 'horizontal'; records?: any; arrayHelpers?: ArrayHelpers; actions?: (arrayHelpers: ArrayHelpers) => React.ReactNode; addButton?: (arrayHelpers: ArrayHelpers) => React.ReactNode; removeButton?: (arrayHelpers: ArrayHelpers) => React.ReactNode; moveUpButton?: (arrayHelpers: ArrayHelpers) => React.ReactNode; moveDownButton?: (arrayHelpers: ArrayHelpers) => React.ReactNode; arrayName?: string; title?: string | React.ReactNode; showActions?: ActionsButtonType | ActionsButtonType[]; actionPosition?: ActionsPositionType; customLayout?: (record: any, arrayName: string) => React.ReactNode; style?: React.CSSProperties; } declare const InputsIterator: React.FC<InputsIteratorProps & any>; export default InputsIterator;