t49tran / react-google-recaptcha-v3

Google Recaptcha V3 integration for React
MIT License
427 stars 91 forks source link

Property 'container' does not exist on type 'IntrinsicAttributes & IGoogleReCaptchaProviderProps'. #142

Closed Rj90029 closed 1 year ago

Rj90029 commented 1 year ago

I am trying to position the captcha badge inline and put inside a div element. I have created a div element and given the ID for element in the props values. It is throwing compilation error as mentioned above. I believe this feature was released recently and I am not sure if I am doing something wrong or this is really a bug.

    <GoogleReCaptchaProvider
      reCaptchaKey={process.env.REACT_APP_RECAPTCHA_SITEKEY as string}
      container={{
        element: "recaptcha-container",
        parameters: {
          badge: "inline",
        },
      }}
    >
      <MyApp/>
    </GoogleReCaptchaProvider>
Rj90029 commented 1 year ago

I just needed to restart the application after installing latest version. It was still pointing to old version even after installing latest release.