2023-09-26 11:39:17 +02:00
|
|
|
import { Dimensions, Platform } from 'react-native'
|
|
|
|
import StaticSafeAreaInsets from 'react-native-static-safe-area-insets'
|
2021-02-19 18:24:32 +01:00
|
|
|
|
2023-09-26 11:39:17 +02:00
|
|
|
export const CONTENT_SPACING = 15
|
2021-02-19 18:24:32 +01:00
|
|
|
|
2021-02-20 17:07:10 +01:00
|
|
|
const SAFE_BOTTOM =
|
|
|
|
Platform.select({
|
|
|
|
ios: StaticSafeAreaInsets.safeAreaInsetsBottom,
|
2023-09-26 11:39:17 +02:00
|
|
|
}) ?? 0
|
2021-02-19 21:14:42 +01:00
|
|
|
|
2021-02-19 18:24:32 +01:00
|
|
|
export const SAFE_AREA_PADDING = {
|
|
|
|
paddingLeft: StaticSafeAreaInsets.safeAreaInsetsLeft + CONTENT_SPACING,
|
|
|
|
paddingTop: StaticSafeAreaInsets.safeAreaInsetsTop + CONTENT_SPACING,
|
|
|
|
paddingRight: StaticSafeAreaInsets.safeAreaInsetsRight + CONTENT_SPACING,
|
2021-02-20 17:07:10 +01:00
|
|
|
paddingBottom: SAFE_BOTTOM + CONTENT_SPACING,
|
2023-09-26 11:39:17 +02:00
|
|
|
}
|
2021-02-19 18:43:41 +01:00
|
|
|
|
|
|
|
// The maximum zoom _factor_ you should be able to zoom in
|
2023-09-26 11:39:17 +02:00
|
|
|
export const MAX_ZOOM_FACTOR = 20
|
2021-02-19 18:43:41 +01:00
|
|
|
|
2023-09-26 11:39:17 +02:00
|
|
|
export const SCREEN_WIDTH = Dimensions.get('window').width
|
2021-02-19 18:43:41 +01:00
|
|
|
export const SCREEN_HEIGHT = Platform.select<number>({
|
2021-02-20 17:07:10 +01:00
|
|
|
android: Dimensions.get('screen').height - StaticSafeAreaInsets.safeAreaInsetsBottom,
|
|
|
|
ios: Dimensions.get('window').height,
|
2023-09-26 11:39:17 +02:00
|
|
|
}) as number
|
2021-02-19 19:06:28 +01:00
|
|
|
|
|
|
|
// Capture Button
|
2023-09-26 11:39:17 +02:00
|
|
|
export const CAPTURE_BUTTON_SIZE = 78
|