@hakit/components
Version:
A series of components to work with @hakit/core
25 lines • 1.24 kB
TypeScript
export interface PreloadImageProps extends Omit<React.ComponentPropsWithoutRef<"div">, "onLoad" | "onError"> {
lazy?: boolean;
src: string;
style?: React.CSSProperties;
innerStyle?: {
backgroundSize?: string;
backgroundPosition?: string;
backgroundRepeat?: string;
};
/** duration of the fade in animation in milliseconds */
duration?: number;
ease?: string;
children?: React.ReactNode;
onClick?: () => void;
onLoad?: () => void;
onError?: () => void;
onLoading?: () => void;
}
/** The PreloadImage is a helper component to load an image into the background of the element, this component is pretty generic and requires additional styling to set the width/height of the
* background image element
*
* It will automatically fade in the image once it's loaded, and will show a loading icon while it's loading, everything is pretty configurable and is completely documented
*/
export declare const PreloadImage: ({ lazy, src, className, style, innerStyle, duration: _duration, ease, children, onLoad, onLoading, onError, onClick, cssStyles, ...rest }: PreloadImageProps) => import("@emotion/react/jsx-runtime").JSX.Element;
//# sourceMappingURL=index.d.ts.map