tinacms
Version:
> The Fastest Way to Edit Next.js Content
58 lines (57 loc) • 1.78 kB
TypeScript
/// <reference types="react" />
import { Field, Form } from '../../forms';
interface GroupFieldDefinititon extends Field {
component: 'group';
fields: Field[];
defaultItem?: object | (() => object);
/**
* An optional function which generates `props` for
* this items's `li`.
*/
itemProps?: (item: object) => {
/**
* The `key` property used to optimize the rendering of lists.
*
* If rendering is causing problems, use `defaultItem` to
* generate a unique key for the item.
*
* Reference:
* * https://reactjs.org/docs/lists-and-keys.html
*/
key?: string;
/**
* The label to be display on the list item.
*/
label?: string;
};
}
interface GroupProps {
input: any;
meta: any;
field: GroupFieldDefinititon;
form: any;
tinaForm: Form;
index?: number;
}
export declare const ItemClickTarget: ({ children, ...props }: {
[x: string]: any;
children: any;
}) => JSX.Element;
export declare const GroupLabel: ({ error, children, }: {
children?: any;
error?: boolean;
}) => JSX.Element;
export declare const ItemHeader: ({ isDragging, children, provider, ...props }: any) => JSX.Element;
export declare const ItemDeleteButton: ({ onClick, disabled }: {
onClick: any;
disabled?: boolean;
}) => JSX.Element;
export declare const DragHandle: ({ isDragging }: {
isDragging: boolean;
}) => JSX.Element;
export declare const GroupListField: ({ tinaForm, form, field, input, meta, index }: GroupProps) => JSX.Element;
export declare const GroupListFieldPlugin: {
name: string;
Component: ({ tinaForm, form, field, input, meta, index }: GroupProps) => JSX.Element;
};
export {};