import { ReactNode, SFC } from 'react';
interface ChildrenFunctionParams {
formData: any;
scopedFormData?: any;
getSource?: (source: string) => string;
}
interface ConnectedProps {
children: (params: ChildrenFunctionParams) => ReactNode;
form?: string;
record?: any;
source?: string;
[key: string]: any;
}
interface Props extends ConnectedProps {
formData: any;
index?: number;
}
/**
* Get the current (edited) value of the record from the form and pass it
* to child function
*
* @example
*
* const PostEdit = (props) => (
*
*
*
*
* {({ formData, ...rest }) => formData.hasEmail &&
*
* }
*
*
*
* );
*
* @example
*
* const OrderEdit = (props) => (
*
*
*
*
* {({ formData, ...rest }) =>
*
* }
*
*
*
* );
*/
export declare const FormDataConsumerView: SFC;
declare const FormDataConsumer: (props: ConnectedProps) => JSX.Element;
export default FormDataConsumer;