import React from 'react'; export interface FastImageCommonProps { /** * Media is surrounded by two spans for positioning. * This class will be added to the outer span. */ className?: string; /** * Media is surrounded by two spans for positioning. * This class will be added to the outer span. * This class will be added when the image is visible and added to the DOM. */ classNameVisible?: string; /** * Media is surrounded by two spans for positioning. * This class will be added to the inner span. */ classNameContainer?: string; /** * Media is surrounded by two spans for positioning. * This class will be added to the inner span. * This class will be added when the image is visible and added to the DOM. */ classNameContainerVisible?: string; /** * The css class that will go on the media element (img or video). */ classNameMedia?: string; /** * The css class that will go on the media element (img or video). * This class will be added when the image is visible and added to the DOM. */ classNameMediaVisible?: string; /** * Whether or not to wait for the image to enter the viewport to load it. */ lazy?: boolean; /** * Determines when the media will be loaded. * e.g. 200px */ lazyLoadMargin?: string; /** * The original width of the media. */ width: number; /** * The original height of the media. */ height: number; onLoad?: Function; onAddedToDOM?: Function; } export interface FastImageImageBestProps extends FastImageCommonProps { imgAlt: string; imgSizes: string; imgSrc: string; imgSrcSet: string; imgBase64: string; imgWebPSrc: string; imgWebPSrcSet: string; } export interface FastImageVideoBestProps extends FastImageCommonProps { videoSrc: string; videoPosterSrc: string; videoPosterWebPSrc: string; videoPosterBase64: string; } export declare type FastImageBestProps = FastImageImageBestProps & FastImageVideoBestProps; export declare type FastImageProps = Partial; export declare class FastImage extends React.PureComponent { static defaultProps: FastImageProps; render(): JSX.Element | null; }