Skip to content

Commit b749438

Browse files
committed
readme: fix incorrect type for onInView callbacks
1 parent 8834b26 commit b749438

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ Toggle prop saves GPU and battery by stopping the video when no longer in view!
6464
| `childPropsInView` | object | props propagated to the child element. Can be used to start video, complex animations and more. |
6565
| `childPropsNotInView` | object | `default: {}` |
6666
| `toggleChildPropsOnInView` | boolean | Toggle between `childPropsInView/childPropsNotInView` instead of just add `childPropsInView` the first time element comes into view and then removing monitoring.. `default: false` |
67-
| `onInView` | object | callback when in view, can be used for tracking. Receives [IntersectionObserverEntry](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry) as argument. |
68-
| `onNotInView` | object | callback when not in view. Receives [IntersectionObserverEntry](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry) as argument. |
67+
| `onInView` | function | callback when in view, can be used for tracking. Receives [IntersectionObserverEntry](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry) as argument. |
68+
| `onNotInView` | function | callback when not in view. Receives [IntersectionObserverEntry](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry) as argument. |
6969
| `repeatOnInView` | boolean | Repeats callbacks for onInView/onNotInView, rather than firing just the first time. `default: false` |
7070
| `intoViewMargin` | string - css margin | Margin added to viewport for area to consider “in view”, can be negative. Use f.e. with positive value for lazy loading content just before in view, or with negative to start fading in element just after in view. Must be `px` or `%`. Default: ‘-20%’. |
7171
| `useInviewMonitor` | func | Convenient function that can be used to dynamically disable the monitor, for example for mobile devices. |

0 commit comments

Comments
 (0)