react-ocean-forms
Version:
Forms components for react based on the context api.
15 lines (14 loc) • 753 B
TypeScript
/**
* Copyright (c) 2018-present, Umweltbundesamt GmbH
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { PropsOf } from '../../utils';
import { IFormContextProps } from './withForm.types';
/**
* High order component for consuming the form context
* @deprecated Deprecated in favour of `useFormContext` hook
*/
export declare const withForm: <TComp extends React.ComponentType<TProps>, TProps extends IFormContextProps = PropsOf<TComp>>(Component: TComp) => React.ComponentType<Pick<JSX.LibraryManagedAttributes<TComp, PropsOf<TComp>>, Exclude<keyof JSX.LibraryManagedAttributes<TComp, PropsOf<TComp>>, "context">>>;