UNPKG

1.02 kBJavaScriptView Raw
1import { NativeModules } from 'react-native';
2const { ExponentScreenOrientation } = NativeModules;
3export 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 = {}));
14export function allow(orientation) {
15 console.warn("'ScreenOrientation.allow' is deprecated in favour of 'ScreenOrientation.allowAsync'");
16 allowAsync(orientation);
17}
18export function allowAsync(orientation) {
19 return ExponentScreenOrientation.allowAsync(orientation);
20}
21export function doesSupportAsync(orientation) {
22 return ExponentScreenOrientation.doesSupportAsync(orientation);
23}
24//# sourceMappingURL=ScreenOrientation.js.map
\No newline at end of file