amis-rpc-design/node_modules/rc-image/lib/interface.d.ts

15 lines
632 B
TypeScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
/// <reference types="react" />
/**
* Used for PreviewGroup passed image data
*/
export type ImageElementProps = Pick<React.ImgHTMLAttributes<HTMLImageElement>, 'src' | 'crossOrigin' | 'decoding' | 'draggable' | 'loading' | 'referrerPolicy' | 'sizes' | 'srcSet' | 'useMap' | 'alt'>;
export type PreviewImageElementProps = {
data: ImageElementProps;
canPreview: boolean;
};
export type InternalItem = PreviewImageElementProps & {
id?: string;
};
export type RegisterImage = (id: string, data: PreviewImageElementProps) => VoidFunction;
export type OnGroupPreview = (id: string, mouseX: number, mouseY: number) => void;