Skip to content

Commit

Permalink
fix: doc
Browse files Browse the repository at this point in the history
  • Loading branch information
DSergiu committed Apr 15, 2024
1 parent 1d22752 commit 86bb6ef
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 13 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ mainstream web frameworks such as: React, Preact, Vue.js, Angular, Stencil.js, e
1. Import once in application (`main.js`). Ignore the custom element.
```js
import "vanilla-hcaptcha";
import "@hcaptcha/vanilla-hcaptcha";

Vue.config.ignoredElements = [
"h-captcha"
Expand Down Expand Up @@ -102,7 +102,7 @@ mainstream web frameworks such as: React, Preact, Vue.js, Angular, Stencil.js, e

1. Import once in application (`index.js`).
```js
import 'vanilla-hcaptcha';
import '@hcaptcha/vanilla-hcaptcha';
```

2. Add event handler after mount
Expand All @@ -129,7 +129,7 @@ mainstream web frameworks such as: React, Preact, Vue.js, Angular, Stencil.js, e

1. Import once in application (`main.ts`).
```js
import 'vanilla-hcaptcha';
import '@hcaptcha/vanilla-hcaptcha';
```
2. Add [`CUSTOM_ELEMENTS_SCHEMA`](https://angular.io/api/core/CUSTOM_ELEMENTS_SCHEMA) to `@NgModule.schemas`

Expand Down Expand Up @@ -225,6 +225,7 @@ If you would like to programmatically call the `render()` method, you can set `a
### API Attributes
These attributes are optional.
These attributes are used at web component creation time and thus, cannot be dynamic.
| Attribute | Values/Type | Default | Description |
|-------------------|----------------------------|---------|--------------------------------------------------------------------------------------------------------------------|
Expand Down
2 changes: 1 addition & 1 deletion examples/cdn/angularjs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>

<!-- <script src="https://cdn.jsdelivr.net/npm/@hcaptcha/vanilla-hcaptcha" async defer></script>-->
<script src="/node_modules/vanilla-hcaptcha/dist/index.min.js"></script>
<script src="/node_modules/@hcaptcha/vanilla-hcaptcha/dist/index.min.js"></script>

<script>
angular.module('angularjsApp', [])
Expand Down
2 changes: 1 addition & 1 deletion examples/cdn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"test": "echo Examples have no tests."
},
"dependencies": {
"vanilla-hcaptcha": "1.0.2"
"@hcaptcha/vanilla-hcaptcha": "1.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/cdn/preact.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>

<script src="https://unpkg.com/vanilla-hcaptcha" async defer></script>
<!-- <script src="/node_modules/vanilla-hcaptcha/dist/index.min.js"></script>-->
<!-- <script src="/node_modules/@hcaptcha/vanilla-hcaptcha/dist/index.min.js"></script>-->
</head>
<body>

Expand Down
4 changes: 2 additions & 2 deletions examples/cdn/react.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>

<script src="https://unpkg.com/vanilla-hcaptcha" async defer></script>
<!-- <script src="/node_modules/vanilla-hcaptcha/dist/index.min.js"></script>-->
<script src="https://unpkg.com/@hcaptcha/vanilla-hcaptcha" async defer></script>
<!-- <script src="/node_modules/@hcaptcha/vanilla-hcaptcha/dist/index.min.js"></script>-->
</head>
<body>

Expand Down
2 changes: 1 addition & 1 deletion examples/cdn/vanilla.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div>Open the console!</div>

<!-- <script src="https://cdn.jsdelivr.net/npm/@hcaptcha/vanilla-hcaptcha" async defer></script>-->
<script src="/node_modules/vanilla-hcaptcha/dist/index.min.js"></script>
<script src="/node_modules/@hcaptcha/vanilla-hcaptcha/dist/index.min.js"></script>

<h-captcha id="signupCaptcha"
site-key="781559eb-513a-4bae-8d29-d4af340e3624"
Expand Down
2 changes: 1 addition & 1 deletion examples/cdn/vue.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script src="https://unpkg.com/[email protected]"></script>

<!-- <script src="https://cdn.jsdelivr.net/npm/@hcaptcha/vanilla-hcaptcha"></script>-->
<script src="/node_modules/vanilla-hcaptcha/dist/index.min.js"></script>
<script src="/node_modules/@hcaptcha/vanilla-hcaptcha/dist/index.min.js"></script>
</head>
<body>
<div id="root">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vanilla-hcaptcha",
"description": "Vanilla Web Component for hCaptcha. 0 dependencies. <1kb gzipped.",
"version": "1.0.2",
"version": "1.0.3",
"author": {
"name": "hCaptcha <[email protected]>",
"url": "https://www.hcaptcha.com"
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 86bb6ef

Please sign in to comment.