Skip to content

Commit

Permalink
doc: update doc to add scrollingElement params
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasCr committed Sep 29, 2022
1 parent bf7c9ba commit 51650ed
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ const activeSection = useScrollSpy({
});
```

| Parameter | Default | Type | Description |
| :----------------- | :-----: | :-----: | ------------------------------------------------ |
| defaultValue | `0` | `int` | Default value that is returned (optional) |
| offsetPx | `0` | `int` | Set offset (optional) |
| sectionElementRefs | `[]` | `[Ref]` | Array of Refs to observe (e.g. via React `refs`) |
| Parameter | Default | Type | Description |
| :----------------- | :--------:| :------:| ------------------------------------------------------------|
| defaultValue | `0` | `int` | Default value that is returned (optional) |
| offsetPx | `0` | `int` | Set offset (optional) |
| sectionElementRefs | `[]` | `[Ref]` | Array of Refs to observe (e.g. via React `refs`) |
| scrollingElement | `window` | `Ref` | Target of the scrolling (e.g. via React `refs`)) (optional) |

### with Refs

Expand Down

0 comments on commit 51650ed

Please sign in to comment.