tinacms
Version:
> The Fastest Way to Edit Next.js Content
37 lines (36 loc) • 2.05 kB
TypeScript
import * as React from 'react';
import { FieldProps } from './field-props';
import { Form } from '../../forms';
export declare type InputFieldType<ExtraFieldProps, InputProps> = FieldProps<InputProps> & ExtraFieldProps;
export declare function wrapFieldsWithMeta<ExtraFieldProps = {}, InputProps = {}>(Field: React.FunctionComponent<InputFieldType<ExtraFieldProps, InputProps>> | React.ComponentClass<InputFieldType<ExtraFieldProps, InputProps>>): (props: InputFieldType<ExtraFieldProps, InputProps>) => JSX.Element;
export declare function wrapFieldWithError<ExtraFieldProps = {}, InputProps = {}>(Field: React.FunctionComponent<InputFieldType<ExtraFieldProps, InputProps>> | React.ComponentClass<InputFieldType<ExtraFieldProps, InputProps>>): (props: InputFieldType<ExtraFieldProps, InputProps>) => JSX.Element;
interface FieldMetaProps extends React.HTMLAttributes<HTMLElement> {
name: string;
children: any;
label?: string | boolean;
description?: string;
error?: string;
margin?: boolean;
index?: number;
tinaForm: Form;
}
export declare const FieldMeta: ({ name, label, description, error, margin, children, index, tinaForm, ...props }: FieldMetaProps) => JSX.Element;
export declare const FieldWrapper: ({ margin, children, ...props }: {
margin: boolean;
children: React.ReactNode;
} & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>>>) => JSX.Element;
export interface FieldLabel extends React.HTMLAttributes<HTMLLabelElement> {
children?: any | any[];
className?: string;
name?: string;
}
export declare const FieldLabel: ({ children, className, name, ...props }: FieldLabel) => JSX.Element;
export declare const FieldDescription: ({ children, className, ...props }: {
children?: any | any[];
className?: string;
}) => JSX.Element;
export declare const FieldError: ({ children, className, ...props }: {
children?: any | any[];
className?: string;
}) => JSX.Element;
export {};