import hoistNonReactStatics from 'hoist-non-react-statics'; import * as React from 'react'; import { GoogleReCaptchaConsumer, IGoogleReCaptchaConsumerProps } from './google-recaptcha-provider'; export interface IWithGoogleReCaptchaProps { googleReCaptchaProps: IGoogleReCaptchaConsumerProps; } // tslint:disable-next-line:only-arrow-functions export const withGoogleReCaptcha = function( Component: React.ComponentType> ): React.ComponentType> { const WithGoogleReCaptchaComponent: React.FunctionComponent< OwnProps & Partial > = props => ( {googleReCaptchaValues => ( )} ); WithGoogleReCaptchaComponent.displayName = `withGoogleReCaptcha(${Component.displayName || Component.name || 'Component'})`; hoistNonReactStatics(WithGoogleReCaptchaComponent, Component); return WithGoogleReCaptchaComponent; };