This repository was archived by the owner on Dec 8, 2020. It is now read-only.
File tree 2 files changed +42
-1
lines changed
2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change
1
+ import { FC , ReactNode } from "react" ;
2
+
3
+ export interface ShapeVisiblitySensor {
4
+ top ?: number ;
5
+ left ?: number ;
6
+ bottom ?: number ;
7
+ right ?: number ;
8
+ }
9
+
10
+ export interface VisibilitySensorProps {
11
+ onChange ?: ( isVisible : boolean ) => void ;
12
+ active ?: boolean ;
13
+ partialVisibility ?: boolean ;
14
+ offset ?: ShapeVisiblitySensor ;
15
+ minTopValue ?: number ;
16
+ intervalCheck ?: boolean ;
17
+ intervalDelay ?: number ;
18
+ scrollCheck ?: boolean ;
19
+ scrollDelay ?: number ;
20
+ scrollThrottle ?: number ;
21
+ resizeCheck ?: boolean ;
22
+ resizeDelay ?: number ;
23
+ resizeThrottle ?: number ;
24
+ containment ?: any ;
25
+ delayedCall ?: boolean ;
26
+ children ?:
27
+ | ReactNode
28
+ | ( ( args : { isVisible : boolean ; visibilityRect ?: ShapeVisiblitySensor } ) => ReactNode ) ;
29
+ }
30
+
31
+ declare const LazyImage : FC < {
32
+ children : ( image : string , loading : boolean , isVisible : boolean ) => ReactNode ;
33
+ placeholder : string ;
34
+ src : string ;
35
+ visibilitySensorProps : VisibilitySensorProps ;
36
+ onError : ( ev : ErrorEvent ) => void ;
37
+ } > ;
38
+
39
+ export default LazyImage ;
Original file line number Diff line number Diff line change 6
6
"engines" : {
7
7
"node" : " >=6.0.0"
8
8
},
9
+ "types" : " index.d.ts" ,
9
10
"files" : [
10
11
" .github" ,
11
12
" lib" ,
12
- " src"
13
+ " src" ,
14
+ " index.d.ts"
13
15
],
14
16
"scripts" : {
15
17
"predev" : " rimraf dist" ,
You can’t perform that action at this time.
0 commit comments