-
Notifications
You must be signed in to change notification settings - Fork 90
/
index.d.ts
105 lines (100 loc) · 2.33 KB
/
index.d.ts
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import * as React from 'react'
export type Props = {
/**
* Default photo to show.
*/
activePhotoIndex?: number
/**
* Executed when a photo is pressed.
*/
activePhotoPressed?: () => void
/**
* Executed when left key of the keyboard is pressed.
*/
leftKeyPressed?: () => void
/**
* Called when next control button is pressed.
*/
nextButtonPressed?: () => void
/**
* Called when the modal is going to close.
*/
onClose: () => void
/**
* Preload number photos.
*/
preloadSize?: number
/**
* Called when previous control button is pressed.
*/
prevButtonPressed?: () => void
/**
* Array of photos.
* It can be an array of photos URLs or an array of objects.
*/
photos: Photo[] | string[]
/**
* Custom labels object.
*/
phrases?: object
/**
* Called when right key of the keyboard is pressed.
*/
rightKeyPressed?: () => void
/**
* Shows the modal when initialized.
*/
show?: boolean
/**
* Whether the gallery should show thumbnails.
*/
showThumbnails?: boolean
/**
* Whether the gallery should react to keyboard events.
*/
keyboard?: boolean
/**
* Whether the gallery should cycle continuously or have hard stops.
*/
wrap?: boolean
/**
* Sets the opacity level for the component background.
*/
opacity?: number
/**
* Sets the background color of the gallery component.
*/
backgroundColor?: string
/**
* Specifies the stack order of the component.
*/
zIndex?: number
};
export type Photo = {
/**
* The source (`src`) of the photo.
*/
photo: string
/**
* The current number of the photo.
*/
number?: number
/**
* Short description of the photo.
*/
caption?: string
/**
* Secondary description.
* Can be used to show the photo author or the name or
* the place where it was taken.
*/
subcaption?: string
/**
* The url of the photo thumbnail.
* The preferred size for each thumbnail is `100x67`.
*/
thumbnail?: string
}
export type ReactBnbGalleryInterface = React.ComponentClass<Props>
declare const ReactBnbGallery: ReactBnbGalleryInterface
export default ReactBnbGallery