Skip to content

Commit

Permalink
Updated docs after testing CDN use.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfmorton committed Nov 17, 2023
1 parent c5e0224 commit bb121d9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,17 @@ customElements.define('my-share-button', ProgressiveShareButtonClass);

```

### CDN - not tested yet
### CDN

~~Not Tested: You can also use the component directly from a CDN. The component is available on [unpkg](https://unpkg.com/progressive-share-button).~~
You can also use the component directly from a CDN. The component is available on [unpkg](https://unpkg.com/progressive-share-button). The following example shows how to use the component from unpkg. Note the use of `?module` at the end of the URL in the import statement.

```html
<!-- script src="https://unpkg.com/progressive-share-button"></script --!>
<script type="module">
import { ProgressiveShareButton } from 'https://unpkg.com/progressive-share-button?module';
// Initialize the component
ProgressiveShareButton();
</script>
<progressive-share-button title="Hello World!" url="https://example.com" debug="true"></progressive-share-button>
```

## Typescript support
Expand Down

0 comments on commit bb121d9

Please sign in to comment.