Skip to content

Commit 5c8a04d

Browse files
authored
Merge pull request #47 from newyork-anthonyng/feature/an/update-docs
Update README.md
2 parents 349aaa8 + b36bed4 commit 5c8a04d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ npm install --save react-google-recaptcha@0.4.1
2929

3030
All you need to do is [sign up for an API key pair][signup]. You will need the client key.
3131

32-
You can then use the reCAPTCHA. The default require, imports a wrapped component that loads the reCAPTCHA script asynchronously.
32+
You can then use the reCAPTCHA. The default require imports a wrapped component that loads the reCAPTCHA script asynchronously.
3333

3434
```jsx
35-
var React = require("react");
35+
var React = require("react").default;
3636
var render = require("react-dom").render
3737
var ReCAPTCHA = require("react-google-recaptcha");
3838

@@ -58,7 +58,7 @@ Other properties can be used to customise the rendering.
5858
|:---- | ---- | ------ |
5959
| sitekey | string | The API client key |
6060
| onChange | func | The function to be called when the user successfully completes the captcha |
61-
| theme | enum | *optional* `light` or `dark` The theme of the widget *(__defaults:__ light)*
61+
| theme | enum | *optional* `light` or `dark` The theme of the widget *(__defaults:__ light)*. See [example][docs_theme]
6262
| type | enum | *optional* `image` or `audio` The type of initial captcha *(__defaults:__ image)*
6363
| tabindex | number | *optional* The tabindex on the element *(__default:__ 0)*
6464
| onExpired | func | *optional* callback when the challenge is expired and has to be redone by user. By default it will call the onChange with null to signify expired callback. |
@@ -88,10 +88,10 @@ The component also has some utility functions that can be called.
8888

8989
Starting with 0.7.0, the component now supports invisible options. See the [reCAPTCHA documentation](https://developers.google.com/recaptcha/docs/invisible) to see how to configure it.
9090

91-
With the invisible option, you need to handle things a bit differently. You will need to call the execute method by yourself.
91+
With the invisible option, you need to handle things a bit differently. You will need to call the `execute` method yourself.
9292

9393
```jsx
94-
var React = require("react");
94+
var React = require("react").default;
9595
var render = require("react-dom").render
9696
var ReCAPTCHA = require("react-google-recaptcha");
9797

@@ -120,7 +120,7 @@ render(
120120
You can also use the barebone components doing the following. Using that component will oblige you to manage the grecaptcha dep and load the script by yourself.
121121

122122
```jsx
123-
var React = require("react");
123+
var React = require("react").default;
124124
var render = require("react-dom").render
125125
var ReCAPTCHA = require("react-google-recaptcha/lib/recaptcha");
126126

@@ -153,6 +153,7 @@ render(
153153
[reCAPTCHA]: https://www.google.com/recaptcha
154154
[signup]: http://www.google.com/recaptcha/admin
155155
[docs]: https://developers.google.com/recaptcha
156+
[docs_theme]: https://developers.google.com/recaptcha/docs/faq#can-i-customize-the-recaptcha-widget
156157
[js_api]: https://developers.google.com/recaptcha/docs/display#js_api
157158
[rb]: https://github.com/react-bootstrap/react-bootstrap/
158159
[reCAPTCHA secure-token]: https://developers.google.com/recaptcha/docs/secure_token

0 commit comments

Comments
 (0)