-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js.flow
56 lines (50 loc) · 1.42 KB
/
index.js.flow
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// @flow
export type Response = {
customButton: string;
didCancel: boolean;
error: string;
data: string;
uri: string;
origURL?: string;
isVertical: boolean;
width: number;
height: number;
fileSize: number;
type?: string;
fileName?: string;
path?: string;
latitude?: number;
longitude?: number;
timestamp?: string;
}
export type CustomButtonOptions = {
name?: string;
title?: string;
}
export type Options = {
title?: string;
cancelButtonTitle?: string;
takePhotoButtonTitle?: string;
chooseFromLibraryButtonTitle?: string;
customButtons?: Array<CustomButtonOptions>;
cameraType?: 'front' | 'back';
mediaType?: 'photo' | 'video' | 'mixed';
maxWidth?: number;
maxHeight?: number;
quality?: number;
videoQuality?: 'low' | 'medium' | 'high';
durationLimit?: number;
rotation?: number;
allowsEditing?: boolean;
noData?: boolean;
storageOptions?: StorageOptions;
}
export type StorageOptions = {
skipBackup?: boolean;
path?: string;
cameraRoll?: boolean;
waitUntilSaved?: boolean;
}
declare export function showImagePicker(options: Options, callback: (response: Response) => void): void;
declare export function launchCamera(options: Options, callback: (response: Response) => void): void;
declare export function launchImageLibrary(options: Options, callback: (response: Response) => void): void;