Skip to content

Commit

Permalink
feat(refactor): use named export instead of default
Browse files Browse the repository at this point in the history
BREAKING CHANGE: use `import {compute}` instead of `import compute`
  • Loading branch information
stipsan committed Feb 14, 2023
1 parent 0c4eb48 commit 8509530
Show file tree
Hide file tree
Showing 5 changed files with 7,249 additions and 15,949 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,13 @@ npm i compute-scroll-into-view
You can also use it from a CDN:

```js
const { default: compute } = await import(
'https://esm.sh/compute-scroll-into-view'
)
const { compute } = await import('https://esm.sh/compute-scroll-into-view')
```

# Usage

```js
import compute from 'compute-scroll-into-view'
import { compute } from 'compute-scroll-into-view'

const node = document.getElementById('hero')

Expand Down
2 changes: 1 addition & 1 deletion integration/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import compute from '../dist/index.js'
import { compute } from '../dist/index.js'
window.computeScrollIntoView = compute

window.mapActions = (item) => ({
Expand Down
Loading

0 comments on commit 8509530

Please sign in to comment.