UNPKG

@tinacms/toolkit

Version:

Tina is a lightweight but powerful toolkit for creating a site editing ui with javascript components. Tina surfaces superpowers for dev’s to create, expand on and customize a simple yet intuitive ui for editing content.

20 lines (16 loc) 665 B
/** */ /// <reference types="react" /> import { Field } from '../forms'; import { InputFieldType } from '../fields/plugins/wrapFieldWithMeta'; 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/wrapFieldWithMeta';