UNPKG

@hakit/components

Version:
28 lines 1.34 kB
import { MotionProps } from 'framer-motion'; type Extendable = Omit<React.ComponentPropsWithoutRef<"div"> & MotionProps, "onLoad" | "onError">; export interface PreloadImageProps extends Extendable { 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; export {}; //# sourceMappingURL=index.d.ts.map