New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/react-google-recaptcha

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-google-recaptcha - npm Package Compare versions

Comparing version

to
0.10.5

6

react-google-recaptcha v0.10/index.d.ts

@@ -1,7 +0,1 @@

// Type definitions for React Google Recaptcha 0.10
// Project: https://github.com/dozoisch/react-google-recaptcha
// Definitions by: Koala Human <https://github.com/KoalaHuman>, Tom Sturge <https://github.com/tomsturge>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from "react";

@@ -8,0 +2,0 @@

14

react-google-recaptcha v0.10/package.json
{
"name": "@types/react-google-recaptcha",
"version": "0.10.4",
"description": "TypeScript definitions for React Google Recaptcha",
"version": "0.10.5",
"description": "TypeScript definitions for react-google-recaptcha",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-google-recaptcha",

@@ -10,9 +10,9 @@ "license": "MIT",

"name": "Koala Human",
"url": "https://github.com/KoalaHuman",
"githubUsername": "KoalaHuman"
"githubUsername": "KoalaHuman",
"url": "https://github.com/KoalaHuman"
},
{
"name": "Tom Sturge",
"url": "https://github.com/tomsturge",
"githubUsername": "tomsturge"
"githubUsername": "tomsturge",
"url": "https://github.com/tomsturge"
}

@@ -31,4 +31,4 @@ ],

},
"typesPublisherContentHash": "0e7b066b815dcd6de0eb5c4f66be9b480fb8e9526bcf5800622fd30be024c5b0",
"typesPublisherContentHash": "0825bdca708377d730eac8fe3093a88046c349253ae1bdff1e2bb52310f85322",
"typeScriptVersion": "4.5"
}

@@ -5,13 +5,94 @@ # Installation

# Summary
This package contains type definitions for React Google Recaptcha (https://github.com/dozoisch/react-google-recaptcha).
This package contains type definitions for react-google-recaptcha (https://github.com/dozoisch/react-google-recaptcha).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-google-recaptcha/v0.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-google-recaptcha/v0/index.d.ts)
````ts
import * as React from "react";
export default ReCAPTCHA;
declare class ReCAPTCHA extends React.Component<ReCAPTCHAProps> {
/**
* Resets the reCAPTCHA widget
*/
reset(): void;
/**
* Programatically invoke the reCAPTCHA check. Used if the invisible reCAPTCHA is on a div instead of a button
*/
execute(): void;
/**
* Gets the response for the reCAPTCHA widget.
* @return the response of the reCAPTCHA widget.
*/
getValue(): string | null;
/**
* Gets the widgetId of reCAPTCHA widget
* @return widgetId | null
*/
getWidgetId(): number | null;
}
type Theme = "light" | "dark";
type Type = "image" | "audio";
type Size = "compact" | "normal" | "invisible";
type Badge = "bottomright" | "bottomleft" | "inline";
export interface ReCAPTCHAProps {
/**
* The API client key
*/
sitekey: string;
/**
* The function to be called when the user successfully completes the normal or compat captcha.
* It will also be called with null, when captcha expires
* @param token string or null
*/
onChange?: ((token: string | null) => void) | undefined;
/**
* Optional light or dark theme of the widget
* @default "light"
*/
theme?: Theme | undefined;
/**
* Optional image or audio The type of initial captcha
* @default "image"
*/
type?: Type | undefined;
/**
* Optional the tabindex of the element
* @default 0
*/
tabindex?: number | undefined;
/**
* Optional callback, called when a challenge expires and has to be redone by the user.
*/
onExpired?: (() => void) | undefined;
/**
* Optional set the stoken parameter, which allows the captcha to be used from different domains,
* @see reCAPTCHA secure-token
*/
stoken?: string | undefined;
/**
* Optional compact, normal or invisible. This allows you to change the size or do an invisible captcha
*/
size?: Size | undefined;
/**
* Optional. The badge location for g-recaptcha with size of "invisible".
*
* @default "bottomright"
*/
badge?: Badge | undefined;
}
````
### Additional Details
* Last updated: Wed, 27 Sep 2023 07:12:04 GMT
* Last updated: Wed, 18 Oct 2023 11:45:05 GMT
* Dependencies: [@types/react](https://npmjs.com/package/@types/react)
* Global values: none
# Credits
These definitions were written by [Koala Human](https://github.com/KoalaHuman), and [Tom Sturge](https://github.com/tomsturge).