Image.d.ts
1.01 KB
import * as React from 'react';
import { GetContainer } from 'rc-util/lib/PortalWrapper';
import PreviewGroup from './PreviewGroup';
export interface ImagePreviewType {
visible?: boolean;
onVisibleChange?: (value: boolean, prevValue: boolean) => void;
getContainer?: GetContainer | false;
}
export interface ImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'placeholder' | 'onClick'> {
src?: string;
wrapperClassName?: string;
wrapperStyle?: React.CSSProperties;
prefixCls?: string;
previewPrefixCls?: string;
placeholder?: React.ReactNode;
fallback?: string;
preview?: boolean | ImagePreviewType;
/**
* @deprecated since version 3.2.1
*/
onPreviewClose?: (value: boolean, prevValue: boolean) => void;
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
}
interface CompoundedComponent<P> extends React.FC<P> {
PreviewGroup: typeof PreviewGroup;
}
declare const ImageInternal: CompoundedComponent<ImageProps>;
export default ImageInternal;