@hcaptcha/react-hcaptcha 1.9.2 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
- package/types/index.d.ts +2 -1
package/README.md
CHANGED
|
@@ -126,7 +126,7 @@ return <HCaptcha ref={captchaRef} onLoad={onLoad} sitekey={sitekey} {...props} /
|
|
|
126
126
|
|---|---|---|---|---|
|
|
127
127
|
|`sitekey`|String|**Yes**|`-`|This is your sitekey, this allows you to load captcha. If you need a sitekey, please visit [hCaptcha](https://www.hcaptcha.com), and sign up to get your sitekey.|
|
|
128
128
|
|`size`|String (normal, compact, invisible)|No|`normal`|This specifies the "size" of the component. hCaptcha allows you to decide how big the component will appear on render, this always defaults to normal.|
|
|
129
|
-
|`theme`|String (light, dark)|No|`light`|hCaptcha supports both a light and dark theme.
|
|
129
|
+
|`theme`|String (light, dark, contrast) or Object|No|`light`|hCaptcha supports both a light and dark theme. Defaults to light. Takes Object if custom theme is used.|
|
|
130
130
|
|`tabindex`|Integer|No|`0`|Set the tabindex of the widget and popup. When appropriate, this can make navigation of your site more intuitive.|
|
|
131
131
|
|`languageOverride`|String (ISO 639-2 code)|No|`auto`|hCaptcha auto-detects language via the user's browser. This overrides that to set a default UI language. See [language codes](https://hcaptcha.com/docs/languages).|
|
|
132
132
|
|`reCaptchaCompat`|Boolean|No|`true`|Disable drop-in replacement for reCAPTCHA with `false` to prevent hCaptcha from injecting into `window.grecaptcha`.|
|
|
@@ -139,7 +139,7 @@ return <HCaptcha ref={captchaRef} onLoad={onLoad} sitekey={sitekey} {...props} /
|
|
|
139
139
|
|`reportapi`|String|No|`-`|See enterprise docs.|
|
|
140
140
|
|`sentry`|String|No|`-`|See enterprise docs.|
|
|
141
141
|
| `cleanup` | Boolean | No | `true` | Remove script tag after setup.|
|
|
142
|
-
|`custom`|Boolean|No|`-`|
|
|
142
|
+
|`custom`|Boolean|No|`-`|Custom theme: see enterprise docs.|
|
|
143
143
|
|`loadAsync`|Boolean|No|`true`|Set if the script should be loaded asynchronously.|
|
|
144
144
|
|`scriptLocation`|Element|No|`document.head`| Location of where to append the script tag. Make sure to add it to an area that will persist to prevent loading multiple times in the same document view. Note: If `null` is provided, the `document.head` will be used.|
|
|
145
145
|
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ interface HCaptchaProps {
|
|
|
24
24
|
languageOverride?: string;
|
|
25
25
|
sitekey: string;
|
|
26
26
|
size?: "normal" | "compact" | "invisible";
|
|
27
|
-
theme?: "light" | "dark";
|
|
27
|
+
theme?: "light" | "dark" | "contrast" | Object;
|
|
28
28
|
tabIndex?: number;
|
|
29
29
|
id?: string;
|
|
30
30
|
reCaptchaCompat?: boolean;
|
|
@@ -46,6 +46,7 @@ declare class HCaptcha extends React.Component<HCaptchaProps, HCaptchaState> {
|
|
|
46
46
|
getRespKey(): string;
|
|
47
47
|
getResponse(): string;
|
|
48
48
|
setData(data: object): void;
|
|
49
|
+
isReady(): boolean;
|
|
49
50
|
execute(opts: { async: true }): Promise<ExecuteResponse>;
|
|
50
51
|
execute(opts?: { async: false }): void;
|
|
51
52
|
execute(opts?: { async: boolean }): Promise<ExecuteResponse> | void;
|