Skip to content

Commit

Permalink
Merge pull request #701 from thebuilder/fix/align-options-with-dom
Browse files Browse the repository at this point in the history
fix: align IntersectionObserver options with DOM API
  • Loading branch information
thebuilder authored Sep 4, 2024
2 parents b6ef3ce + abb4ee8 commit 7c6939a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface RenderProps {

export interface IntersectionOptions extends IntersectionObserverInit {
/** The IntersectionObserver interface's read-only `root` property identifies the Element or Document whose bounds are treated as the bounding box of the viewport for the element which is the observer's target. If the `root` is null, then the bounds of the actual document viewport are used.*/
root?: Element | null;
root?: Element | Document | null;
/** Margin around the root. Can have values similar to the CSS margin property, e.g. `10px 20px 30px 40px` (top, right, bottom, left). */
rootMargin?: string;
/** Number between `0` and `1` indicating the percentage that should be visible before triggering. Can also be an `array` of numbers, to create multiple trigger points. */
Expand Down

0 comments on commit 7c6939a

Please sign in to comment.