UNPKG

@fakel/rest-admin

Version:

An application that makes it easier to work with your API

52 lines (42 loc) 1.23 kB
import { FormItemProps } from 'antd/lib/form'; import { InputProps } from 'antd/lib/input'; import { SelectProps } from 'antd/lib/select'; import { DatePickerProps } from 'antd/lib/date-picker'; import { InputNumberProps } from 'antd/lib/input-number'; import { ColumnType } from 'antd/lib/table'; import React, { Key } from 'react'; import { FieldConfig } from 'formik'; export type LinkT = 'edit' | 'show' | 'list' | 'create'; export type FieldProps = { source: string; label?: string; record?: string; reference?: string; }; export interface FormFieldProps extends FieldConfig { component?: any; } export type RedirectTo = 'create' | 'list' | 'edit' | 'show'; export type AntFieldProps = FormItemProps<any> & InputProps & (SelectProps<any> | DatePickerProps | InputNumberProps); type SortOrder = 'descend' | 'ascend'; export type ColumnT = { id?: string; title: string; source: string; fieldProps?: any; Field: any; FieldChildren?: () => React.ReactNode; reference?: string; link?: string; sortDirections?: SortOrder[]; sorter?: (a: any, b: any) => any; query?: string; queryField?: string; options?: ColumnType<any>; }; export type OptionT = { value: Key; label: string; };