react-google-invisible-recaptcha icon indicating copy to clipboard operation
react-google-invisible-recaptcha copied to clipboard

Added typescript types

Open Reggino opened this issue 5 years ago • 1 comments

Thank you for this.

Please consider adding these types for Typescript users.

Reggino avatar Oct 06 '19 11:10 Reggino

Thank you for this.

Please consider adding these types for Typescript users.

if you want to use it by using typescript

  1. Create a recaptcha.d.ts file in your project folder
  2. Add this code into recaptcha.d.ts:
declare module "react-google-invisible-recaptcha" {
  export default class GoogleRecaptcha extends React.Component<{
    sitekey: string;
    locale?: string;
    onResolved?: () => void;
    badge?: "bottomright" | "bottomleft" | "inline";
    nonce?: string;
    onExpired?: () => void;
    onError?: () => void;
    onLoaded?: () => void;
    style?: CSSStyleDeclaration;
    tabindex?: number;
  }> {}
}

AntoineKM avatar Mar 22 '22 14:03 AntoineKM