Skip to content

Added typescript types#32

Open
Reggino wants to merge 1 commit into
szchenghuang:masterfrom
Reggino:typescript-types
Open

Added typescript types#32
Reggino wants to merge 1 commit into
szchenghuang:masterfrom
Reggino:typescript-types

Conversation

@Reggino

@Reggino Reggino commented Oct 6, 2019

Copy link
Copy Markdown

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

antoinekm commented Mar 22, 2022

Copy link
Copy Markdown

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