UNPKG

rehance-forms

Version:
14 lines (13 loc) 628 B
import * as React from "react"; import { ScopeContext } from "./ScopeContext"; export declare type WithFormScopeProps<ChildProps> = ChildProps & { formScope: ScopeContext; ref?: React.Ref<any>; }; /** * Creates a higher-order component that binds the given component to the FormScopeConsumer * that provides access to the form scope context API. */ export declare function withFormScope<ChildProps extends object = {}>(Component: React.ComponentType<WithFormScopeProps<ChildProps>>): React.ForwardRefExoticComponent<React.PropsWithoutRef<{ children?: React.ReactNode; } & ChildProps> & React.RefAttributes<any>>;