Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added typescript types #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Reggino
Copy link

@Reggino Reggino commented Oct 6, 2019

Thank you for this.

Please consider adding these types for Typescript users.

@szchenghuang szchenghuang force-pushed the master branch 9 times, most recently from 885a65a to 9c7f8cb Compare May 10, 2021 12:15
@AntoineKM
Copy link

AntoineKM commented Mar 22, 2022

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;
  }> {}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants