UNPKG

lazy-load-img-component

Version:

An simple image lazy load component based on react hooks and IntersectionObserver

10 lines (9 loc) 292 B
import { CSSProperties, ImgHTMLAttributes } from 'react'; export interface LazyLoadPropsType { loadingImg?: string; src: string; errorImg?: string; style?: CSSProperties; imgOptions?: Omit<ImgHTMLAttributes<HTMLImageElement>, 'src'>; options?: IntersectionObserver; }