2024-02-03 20:23:31 -07:00
|
|
|
import { Dimensions, Platform } from "react-native";
|
|
|
|
import StaticSafeAreaInsets from "react-native-static-safe-area-insets";
|
2024-01-29 20:01:45 -07:00
|
|
|
|
2024-02-03 20:23:31 -07:00
|
|
|
export const CONTENT_SPACING = 15;
|
2024-01-29 20:01:45 -07:00
|
|
|
|
|
|
|
const SAFE_BOTTOM =
|
2024-02-03 20:23:31 -07:00
|
|
|
Platform.select({
|
|
|
|
ios: StaticSafeAreaInsets.safeAreaInsetsBottom,
|
|
|
|
}) ?? 0;
|
2024-01-29 20:01:45 -07:00
|
|
|
|
|
|
|
export const SAFE_AREA_PADDING = {
|
2024-02-03 20:23:31 -07:00
|
|
|
paddingLeft: StaticSafeAreaInsets.safeAreaInsetsLeft + CONTENT_SPACING,
|
|
|
|
paddingTop: StaticSafeAreaInsets.safeAreaInsetsTop + CONTENT_SPACING,
|
|
|
|
paddingRight: StaticSafeAreaInsets.safeAreaInsetsRight + CONTENT_SPACING,
|
|
|
|
paddingBottom: SAFE_BOTTOM + CONTENT_SPACING,
|
|
|
|
};
|
2024-01-29 20:01:45 -07:00
|
|
|
|
|
|
|
// The maximum zoom _factor_ you should be able to zoom in
|
2024-02-03 20:23:31 -07:00
|
|
|
export const MAX_ZOOM_FACTOR = 10;
|
2024-01-29 20:01:45 -07:00
|
|
|
|
2024-02-03 20:23:31 -07:00
|
|
|
export const SCREEN_WIDTH = Dimensions.get("window").width;
|
2024-01-29 20:01:45 -07:00
|
|
|
export const SCREEN_HEIGHT = Platform.select<number>({
|
2024-02-03 20:23:31 -07:00
|
|
|
android:
|
|
|
|
Dimensions.get("screen").height - StaticSafeAreaInsets.safeAreaInsetsBottom,
|
|
|
|
ios: Dimensions.get("window").height,
|
|
|
|
}) as number;
|
2024-01-29 20:01:45 -07:00
|
|
|
|
|
|
|
// Capture Button
|
2024-02-03 20:23:31 -07:00
|
|
|
export const CAPTURE_BUTTON_SIZE = 78;
|
2024-01-29 20:01:45 -07:00
|
|
|
|
|
|
|
// Control Button like Flash
|
2024-02-03 20:23:31 -07:00
|
|
|
export const CONTROL_BUTTON_SIZE = 40;
|