tinacms
Version:
[](https://github.com/tinacms/tinacms/blob/main/LICENSE) [](https://www.npmjs.com/package/tinacms) [![Bui
14 lines (13 loc) • 629 B
TypeScript
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';