@captchafox/react
Advanced tools
Comparing version
@@ -54,3 +54,16 @@ "use client"; | ||
var CaptchaFox = forwardRef( | ||
({ sitekey, lang, mode, theme, className, nonce, onError, onVerify, onLoad, onFail, onClose }, ref) => { | ||
({ | ||
sitekey, | ||
lang, | ||
mode, | ||
theme, | ||
className, | ||
nonce, | ||
i18n, | ||
onError, | ||
onVerify, | ||
onLoad, | ||
onFail, | ||
onClose | ||
}, ref) => { | ||
const [containerRef, setContainerRef] = useState(); | ||
@@ -105,2 +118,3 @@ const [widgetId, setWidgetId] = useState(); | ||
theme, | ||
i18n, | ||
onError, | ||
@@ -107,0 +121,0 @@ onFail, |
{ | ||
"name": "@captchafox/react", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"main": "./dist/index.cjs", | ||
@@ -38,3 +38,3 @@ "module": "./dist/index.js", | ||
"dependencies": { | ||
"@captchafox/types": "^1.2.0" | ||
"@captchafox/types": "^1.3.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "devDependencies": { |
@@ -37,14 +37,15 @@ # @captchafox/react | ||
| **Prop** | **Type** | **Description** | **Required** | | ||
| -------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------ | | ||
| sitekey | `string` | The sitekey for the widget | ✅ | | ||
| lang | `string` | The language the widget should display. Defaults to automatically detecting it. | | | ||
| mode | `inline\|popup\|hidden` | The mode the widget should be displayed in . | | | ||
| theme | `light` | `dark` | [`ThemeDefinition`](https://docs.captchafox.com/theming#custom-theme) | The theme of the widget. Defaults to light. | | | ||
| nonce | `string` | Randomly generated nonce | | | ||
| onVerify | `function` | Called with the response token after successful verification. | | | ||
| onFail | `function` | Called after unsuccessful verification. | | | ||
| onError | `function` | Called when an error occured. | | | ||
| onExpire | `function` | Called when the challenge expires. | | | ||
| onClose | `function` | Called when the challenge was closed. | | | ||
| **Prop** | **Type** | **Description** | **Required** | | ||
| -------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------ | | ||
| sitekey | `string` | The sitekey for the widget | ✅ | | ||
| lang | `string` | The language the widget should display. Defaults to automatically detecting it. | | | ||
| mode | `inline\|popup\|hidden` | The mode the widget should be displayed in . | | | ||
| theme | `light` | `dark` | [`ThemeDefinition`](https://docs.captchafox.com/theming#custom-theme) | The theme of the widget. Defaults to light. | | | ||
| nonce | `string` | Randomly generated nonce . | | | ||
| i18n | `object` | Custom i18n configuration. | | | ||
| onVerify | `function` | Called with the response token after successful verification. | | | ||
| onFail | `function` | Called after unsuccessful verification. | | | ||
| onError | `function` | Called when an error occured. | | | ||
| onExpire | `function` | Called when the challenge expires. | | | ||
| onClose | `function` | Called when the challenge was closed. | | | ||
@@ -51,0 +52,0 @@ ### Using the verification callback |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18144
1.9%351
8.67%98
1.03%0
-100%2
100%Updated