-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Devlander-Software/create-npm-package
Create npm package
- Loading branch information
Showing
8 changed files
with
11,992 additions
and
6,708 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
42 changes: 35 additions & 7 deletions
42
src/hocs/withVisibilitySensor/withVisibilitySensor.hoc.tsx
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
10 changes: 7 additions & 3 deletions
10
typings/hocs/withVisibilitySensor/withVisibilitySensor.hoc.d.ts
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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import { VisibilityOffset } from "@devlander/hooks"; | ||
import type { ComponentType } from "react"; | ||
import React from "react"; | ||
type WithVisibilitySensorProps = { | ||
interface WithVisibilitySensorProps { | ||
isVisible: boolean; | ||
}; | ||
export declare function withVisibilitySensor<P>(WrappedComponent: ComponentType<P & WithVisibilitySensorProps>): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>; | ||
visibilityOffset?: VisibilityOffset; | ||
checkInterval?: number; | ||
stopWatching?: boolean; | ||
} | ||
export declare function withVisibilitySensor<P>(WrappedComponent: ComponentType<P & WithVisibilitySensorProps>): React.ForwardRefExoticComponent<React.PropsWithoutRef<P & WithVisibilitySensorProps> & React.RefAttributes<any>>; | ||
export {}; |
Oops, something went wrong.