@types/react-imageloader
TypeScript icon, indicating that this package has built-in type declarations

2.1.16 • Public • Published

Installation

npm install --save @types/react-imageloader

Summary

This package contains type definitions for react-imageloader (https://github.com/hzdg/react-imageloader).

Details

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;
}

Additional Details

  • Last updated: Thu, 29 Feb 2024 19:35:43 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Stephen Jelfs.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-imageloader

Weekly Downloads

294

Version

2.1.16

License

MIT

Unpacked Size

5.31 kB

Total Files

5

Last publish

Collaborators

  • types