1 | import { NativeModules } from 'react-native';
|
2 | const { ExponentScreenOrientation } = NativeModules;
|
3 | export var Orientation;
|
4 | (function (Orientation) {
|
5 | Orientation["ALL"] = "ALL";
|
6 | Orientation["ALL_BUT_UPSIDE_DOWN"] = "ALL_BUT_UPSIDE_DOWN";
|
7 | Orientation["PORTRAIT"] = "PORTRAIT";
|
8 | Orientation["PORTRAIT_UP"] = "PORTRAIT_UP";
|
9 | Orientation["PORTRAIT_DOWN"] = "PORTRAIT_DOWN";
|
10 | Orientation["LANDSCAPE"] = "LANDSCAPE";
|
11 | Orientation["LANDSCAPE_LEFT"] = "LANDSCAPE_LEFT";
|
12 | Orientation["LANDSCAPE_RIGHT"] = "LANDSCAPE_RIGHT";
|
13 | })(Orientation || (Orientation = {}));
|
14 | export function allow(orientation) {
|
15 | console.warn("'ScreenOrientation.allow' is deprecated in favour of 'ScreenOrientation.allowAsync'");
|
16 | allowAsync(orientation);
|
17 | }
|
18 | export function allowAsync(orientation) {
|
19 | return ExponentScreenOrientation.allowAsync(orientation);
|
20 | }
|
21 | export function doesSupportAsync(orientation) {
|
22 | return ExponentScreenOrientation.doesSupportAsync(orientation);
|
23 | }
|
24 |
|
\ | No newline at end of file |