antd-mobile
Version:
<img src="https://gw.alipayobjects.com/mdn/rms_ee68a8/afts/img/A*hjjDS5Yy-ooAAAAAAAAAAAAAARQnAQ" alt="logo" width="100%" />
17 lines (16 loc) • 827 B
TypeScript
import React, { ReactNode } from 'react';
import { NativeProps } from '../../utils/native-props';
export declare type ImageProps = {
src: string;
alt?: string;
width?: number | string;
height?: number | string;
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
placeholder?: ReactNode;
fallback?: ReactNode;
lazy?: boolean;
onClick?: (event: React.MouseEvent<HTMLImageElement, Event>) => void;
onError?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
onLoad?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
} & NativeProps<'--width' | '--height'> & Pick<React.ImgHTMLAttributes<HTMLImageElement>, 'crossOrigin' | 'decoding' | 'loading' | 'referrerPolicy' | 'sizes' | 'srcSet' | 'useMap'>;
export declare const Image: React.FC<ImageProps>;