@tjoskar/react-lazyload-img
Version:
Lazy image loader for react
26 lines (25 loc) • 705 B
TypeScript
/// <reference types="react" />
export declare type IntersectionObserverEntryType = IntersectionObserverEntry & {
isIntersecting: boolean;
};
export declare type ObserverOptions = {
root?: Element;
rootMargin?: string;
threshold?: number;
};
export declare type Props = {
defaultImage: string;
image: string;
errorImage?: string;
onLoaded?: () => void;
options?: ObserverOptions;
style?: Object;
};
export declare type ImgProps = JSX.IntrinsicElements['img'] & Props & {
height: number | string;
width: number | string;
};
export declare type DivProps = JSX.IntrinsicElements['div'] & Props & {
height?: number | string;
width?: number | string;
};