File tree Expand file tree Collapse file tree 5 files changed +6295
-5046
lines changed Expand file tree Collapse file tree 5 files changed +6295
-5046
lines changed Original file line number Diff line number Diff line change 11{
2- "presets" : [" env" , " react" ],
3- "plugins" : [" transform -class-properties" ]
4- }
2+ "presets" : [" @babel/preset- env" , " @babel/preset- react" ],
3+ "plugins" : [" @babel/plugin-proposal -class-properties" ]
4+ }
Original file line number Diff line number Diff line change 1- Changelog
2- ====
1+ # Changelog
2+
3+ ## 5.1.1
4+
5+ - Upgrade outdated dependencies to resolve vulnerabilities ([ #162 ] ( https://github.com/joshwnj/react-visibility-sensor/pull/162 ) )
6+
7+ ## 5.1.0
8+
9+ - Add TypeScript definition ([ #153 ] ( https://github.com/joshwnj/react-visibility-sensor/pull/153 ) )
310
411## 5.0.0
512
@@ -111,7 +118,7 @@ Changelog
111118
112119If you're not setting a ` className ` or ` style ` , no change is required.
113120
114- Otherwise add your own element as a child and move the ` className ` or ` style ` there. Eg:
121+ Otherwise add your own element as a child and move the ` className ` or ` style ` there. Eg:
115122
116123- before: ` <VisibilitySensor className='something' /> `
117124- after: ` <VisibilitySensor><div className='something' /></VisibilitySensor> `
Original file line number Diff line number Diff line change 1+ declare module "react-visibility-sensor" {
2+ import * as React from "react" ;
3+
4+ interface Shape {
5+ top ?: number ;
6+ left ?: number ;
7+ bottom ?: number ;
8+ right ?: number ;
9+ }
10+
11+ interface Props {
12+ onChange ?: ( isVisible : boolean ) => void ;
13+ active ?: boolean ;
14+ partialVisibility ?: boolean ;
15+ offset ?: Shape ;
16+ minTopValue ?: number ;
17+ intervalCheck ?: boolean ;
18+ intervalDelay ?: number ;
19+ scrollCheck ?: boolean ;
20+ scrollDelay ?: number ;
21+ scrollThrottle ?: number ;
22+ resizeCheck ?: boolean ;
23+ resizeDelay ?: number ;
24+ resizeThrottle ?: number ;
25+ containment ?: any ;
26+ delayedCall ?: boolean ;
27+ children ?:
28+ | React . ReactNode
29+ | ( (
30+ args : { isVisible : boolean ; visibilityRect ?: Shape }
31+ ) => React . ReactNode ) ;
32+ }
33+
34+ const ReactVisibilitySensor : React . StatelessComponent < Props > ;
35+
36+ export default ReactVisibilitySensor ;
37+ }
You can’t perform that action at this time.
0 commit comments