21 lines
934 B
TypeScript
21 lines
934 B
TypeScript
import type { CSSProperties, ImgHTMLAttributes } from "react";
|
|
|
|
/** React/Vite/Next-compatible remote image with automatic sizing and a gray placeholder. */
|
|
export interface BiImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "width" | "height"> {
|
|
/** Relative CDN key or full URL. Empty/error => gray unless fallbackSrc is specified. */
|
|
src?: string | null;
|
|
/** Fallback URL, used as provided (e.g. /default.svg), not passed through the image proxy. */
|
|
fallbackSrc?: string | null;
|
|
/** CSS px, units, %, or "auto". The omitted dimension preserves intrinsic aspect ratio. */
|
|
width?: number | string;
|
|
height?: number | string;
|
|
/** Optional aliases independent of Chakra. */
|
|
w?: number | string;
|
|
h?: number | string;
|
|
objectFit?: CSSProperties["objectFit"];
|
|
objectPosition?: CSSProperties["objectPosition"];
|
|
}
|
|
|
|
export declare function BiImage(props: BiImageProps): any;
|
|
export default BiImage;
|