UNPKG

tinacms

Version:

[![GitHub license](https://img.shields.io/github/license/tinacms/tinacms?color=blue)](https://github.com/tinacms/tinacms/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/tinacms.svg?style=flat)](https://www.npmjs.com/package/tinacms) [![Bui

14 lines (13 loc) 629 B
import { Field } from '../forms'; import { InputFieldType } from '../fields/plugins/wrap-field-with-meta'; export interface FieldPlugin<ExtraFieldProps = {}, InputProps = {}> { __type: 'field'; name: string; Component: React.FC<InputFieldType<ExtraFieldProps, InputProps>>; type?: string; validate?(value: any, allValues: any, meta: any, field: Field): string | object | undefined; parse?: (value: any, name: string, field: Field) => any; format?: (value: any, name: string, field: Field) => any; defaultValue?: any; } export type { InputFieldType } from '../fields/plugins/wrap-field-with-meta';