-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as React from "react"; | ||
|
||
interface TrackVisibilityProps { | ||
/** | ||
* Define if the visibility need to be tracked once | ||
*/ | ||
once?: boolean; | ||
|
||
/** | ||
* Tweak the throttle interval | ||
* Check https://css-tricks.com/debouncing-throttling-explained-examples/ for more details | ||
*/ | ||
throttleInterval?: number; | ||
|
||
/** | ||
* Additional style to apply | ||
*/ | ||
style?: object; | ||
|
||
/** | ||
* Additional className to apply | ||
*/ | ||
className?: string; | ||
|
||
/** | ||
* Define an offset. Can be useful for lazy loading | ||
*/ | ||
offset?: number; | ||
|
||
/** | ||
* Update the visibility state as soon as a part of the tracked component is visible | ||
*/ | ||
partialVisibility?: boolean; | ||
} | ||
|
||
export class TrackVisibility extends React.Component<TrackVisibilityProps> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters