forked from wrathyz/react-native-immersive-mode
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
73 lines (61 loc) · 1.63 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
import { EmitterSubscription } from 'react-native'
/**
* @deprecated
*/
type ImmersiveModeType = {
Normal: number,
Full: number,
FullSticky: number,
Bottom: number,
BottomSticky: number,
}
type BarViisibilityType = {
statusBar: boolean,
navigationBottomBar: boolean
}
type ImmersiveBarStyleType = 'Dark' | 'Light';
type ImmersiveBarModeType =
'Normal' |
'Full' |
'FullSticky' |
'Bottom' |
'BottomSticky'
interface ImmersiveModeStatic extends ImmersiveModeType {
fullLayout(full: boolean): void;
/**
* Set system ui mode.
* @param mode
*
* @deprecated use `setBarMode` instaead.
*/
setImmersive(mode: ImmersiveModeType): void;
/**
* Set system ui mode.
* @param mode
*/
setBarMode(mode: ImmersiveBarModeType): void;
/**
* Set color of system bar.
* When set color translucent will be disabled.
*
* @param color color hex #rrggbbaa. if color is null will set default color
*/
setBarColor(color: string): void;
/**
* Set style of system bar.
* System Navigation will be Light, must be change bar color `setBarColor` to other color first.
*
* @param style
*/
setBarStyle(style: ImmersiveBarStyleType): void;
/**
* System bar background color is transparent 50%.
* When `true` bar color will be disabled.
*
* @param enable
*/
setBarTranslucent(enable: boolean): void;
addEventListener(callback: (viisibility: BarViisibilityType) => void): EmitterSubscription;
}
declare const ImmersiveMode: ImmersiveModeStatic;
export default ImmersiveMode;