Skip to content

Commit

Permalink
fix: align IntersectionObserver options with DOM API
Browse files Browse the repository at this point in the history
  • Loading branch information
thebuilder committed Sep 4, 2024
1 parent b6ef3ce commit abb4ee8
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 abb4ee8

Please sign in to comment.