tinacms
Version:
[](https://github.com/tinacms/tinacms/blob/main/LICENSE) [](https://www.npmjs.com/package/tinacms) [![Bui
62 lines (61 loc) • 1.9 kB
TypeScript
import React from 'react';
import type { 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;
}) => React.JSX.Element;
export declare const GroupLabel: ({ error, children, }: {
children?: any;
error?: boolean;
}) => React.JSX.Element;
export declare const ItemHeader: ({ isDragging, children, provider, ...props }: {
isDragging: boolean;
children: any | any[];
provider: any;
} & any) => React.JSX.Element;
export declare const ItemDeleteButton: ({ onClick, disabled }: {
onClick: any;
disabled?: boolean;
}) => React.JSX.Element;
export declare const DragHandle: ({ isDragging }: {
isDragging: boolean;
}) => React.JSX.Element;
export declare const GroupListField: ({ tinaForm, form, field, input, meta, index }: GroupProps) => React.JSX.Element;
export declare const GroupListFieldPlugin: {
name: string;
Component: ({ tinaForm, form, field, input, meta, index }: GroupProps) => React.JSX.Element;
};
export {};