1 |
|
2 |
|
3 | import { NativeModules } from 'react-native';
|
4 |
|
5 | export const Orientation = {
|
6 | ALL: 'ALL',
|
7 | ALL_BUT_UPSIDE_DOWN: 'ALL_BUT_UPSIDE_DOWN',
|
8 | PORTRAIT: 'PORTRAIT',
|
9 | PORTRAIT_UP: 'PORTRAIT_UP',
|
10 | PORTRAIT_DOWN: 'PORTRAIT_DOWN',
|
11 | LANDSCAPE: 'LANDSCAPE',
|
12 | LANDSCAPE_LEFT: 'LANDSCAPE_LEFT',
|
13 | LANDSCAPE_RIGHT: 'LANDSCAPE_RIGHT',
|
14 | };
|
15 |
|
16 | type OrientationT = $Enum<typeof Orientation>;
|
17 |
|
18 | export function allow(orientation: OrientationT): void {
|
19 | NativeModules.ExponentScreenOrientation.allow(orientation);
|
20 | }
|