npm install --save @types/react-imageloader
This package contains type definitions for react-imageloader (https://github.com/hzdg/react-imageloader).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-imageloader.
/// <reference types="react" />
declare module "react-imageloader" {
interface ImageLoaderProps extends React.RefAttributes<ImageLoader> {
children?: React.ReactNode;
/** An optional class name for the wrapper component. */
className?: string | undefined;
/** An optional object containing props for the underlying img component. */
imgProps?: any;
/** An optional handler for the error event. */
onError?: ((event: any) => void) | undefined;
/** An optional handler for the load event. */
onLoad?: ((event: any) => void) | undefined;
/** An optional function that returns a React element to be shown while the image loads. */
preloader?: ((params: any) => React.ReactElement) | undefined;
/** The URL of the image to be loaded. */
src: string;
/** An optional object containing styles for the wrapper component. */
style?: React.CSSProperties | undefined;
/** A function that takes a props argument and returns a React element to be used as the wrapper component. Defaults to React.DOM.span. */
wrapper?: ((props: any) => React.ReactElement) | undefined;
}
class ImageLoader extends React.Component<ImageLoaderProps> {}
export = ImageLoader;
}
- Last updated: Thu, 29 Feb 2024 19:35:43 GMT
- Dependencies: @types/react
These definitions were written by Stephen Jelfs.