UNPKG

507 BJavaScriptView Raw
1// @flow
2
3import { NativeModules } from 'react-native';
4
5export 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
16type OrientationT = $Enum<typeof Orientation>;
17
18export function allow(orientation: OrientationT): void {
19 NativeModules.ExponentScreenOrientation.allow(orientation);
20}