forked from wonday/react-native-orientation-locker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
40 lines (33 loc) · 997 Bytes
/
index.js
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
//
// react-native-orientation-locker
//
//
// Created by Wonday on 17/5/12.
// Copyright (c) wonday.org All rights reserved.
//
"use strict";
// import Orientation from './src/orientation';
import OrientationAndroid from './src/orientation.android';
import OrientationIOS from './src/orientation.ios';
import OrientationHarmony from './src/orientation.harmony';
import {Platform} from 'react-native'
export * from './src/hooks';
export * from './src/OrientationLocker';
export const OrientationType = {
PORTRAIT: 'PORTRAIT',
'PORTRAIT-UPSIDEDOWN': 'PORTRAIT-UPSIDEDOWN',
'LANDSCAPE-LEFT': 'LANDSCAPE-LEFT',
'LANDSCAPE-RIGHT': 'LANDSCAPE-RIGHT',
'FACE-UP': 'FACE-UP',
'FACE-DOWN': 'FACE-DOWN',
UNKNOWN: 'UNKNOWN',
};
let Orientation
if (Platform.OS === 'harmony') {
Orientation = OrientationHarmony
} else if (Platform.OS === 'android') {
Orientation = OrientationAndroid
} else if (Platform.OS === 'ios') {
Orientation = OrientationIOS
}
export default Orientation;