-
-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathinterface.ts
More file actions
29 lines (25 loc) · 673 Bytes
/
interface.ts
File metadata and controls
29 lines (25 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* Used for PreviewGroup passed image data
*/
export type ImageElementProps = Pick<
React.ImgHTMLAttributes<HTMLImageElement>,
| 'src'
| 'crossOrigin'
| 'decoding'
| 'draggable'
| 'loading'
| 'referrerPolicy'
| 'sizes'
| 'srcSet'
| 'useMap'
| 'alt'
> & { type?: 'image' | 'video' };
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, imageSrc: string, mouseX: number, mouseY: number) => void;