/** * Copied from chakra-ui, license MIT * Accessed 2021-12-26, commit September 9th, 2021 * Changes: Heavily modified to use use as: or PropsOf, add displayNames * See: https://github.com/chakra-ui/chakra-ui/blob/a1ca91b/packages/image/src/image.tsx */ import React from "react"; import { UseImageProps } from "../hooks/useImage"; interface NativeImageOptions { /** * The native HTML `width` attribute to the passed to the `img` */ htmlWidth?: string | number; /** * The native HTML `height` attribute to the passed to the `img` */ htmlHeight?: string | number; } interface ImageOptions extends NativeImageOptions { /** * Fallback image `src` to show if image is loading or image fails. * * Note 🚨: We recommend you use a local image */ fallbackSrc?: string; /** * Fallback element to show if image is loading or image fails. * @type React.ReactElement */ fallback?: React.ReactElement; /** * Defines loading strategy */ loading?: "eager" | "lazy"; /** * How the image to fit within its bounds. * It maps to css `object-fit` property. */ fit?: React.CSSProperties["objectFit"]; /** * How to align the image within its bounds. * It maps to css `object-position` property. */ align?: React.CSSProperties["objectPosition"]; /** * If `true`, opt out of the `fallbackSrc` logic and use as `img` */ ignoreFallback?: boolean; } export interface ImageProps extends UseImageProps, Omit, keyof UseImageProps>, ImageOptions { } /** * React component that renders an image with support * for fallbacks * * @see Docs https://chakra-ui.com/image */ export declare const Image: React.ForwardRefExoticComponent & React.RefAttributes>; export interface ImgProps extends React.HTMLProps, NativeImageOptions { } /** * Fallback component for most SSR users who want to use the native `img` with * support for chakra props */ export declare const Img: React.ForwardRefExoticComponent & React.RefAttributes>; export {};