Skip to content

Commit

Permalink
Fix the CDN link and add stylesheet CDN link (#548)
Browse files Browse the repository at this point in the history
This follows up the commit 2907c45.

After switching to Vite, the CDN link has been changed from
`ReactCrop.min.js` to `index.umd.cjs`, so the README.md should indicate
the new built file.

In addition, the stylesheet CDN link should also be included when using
`index.umd.cjs`.
  • Loading branch information
yykamei authored Jun 26, 2023
1 parent a4c2f34 commit e2b083a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ See the [sandbox demo](https://codesandbox.io/s/react-image-crop-demo-with-react
## CDN

```html
<script src="https://unpkg.com/react-image-crop/dist/ReactCrop.min.js"></script>
<link href="https://unpkg.com/react-image-crop/dist/ReactCrop.css" rel="stylesheet">
<script src="https://unpkg.com/react-image-crop/dist/index.umd.cjs"></script>
```

Note when importing the script globally using a `<script>` tag access the component with `ReactCrop.Component`.
Expand Down

0 comments on commit e2b083a

Please sign in to comment.