@applicaster/zapp-react-native-utils
Version:
Applicaster Zapp React Native utilities package
33 lines (27 loc) • 636 B
text/typescript
type DeviceInfo = {
isTablet: boolean;
scale: number;
orientation: string;
isTabletLandscape: boolean;
};
type RNDimensions = {
width: number;
height: number;
scale?: number;
fontScale?: number;
deviceInfo?: DeviceInfo;
statusBarHeight: number;
};
type DimensionsFlag = boolean;
export type Options = {
fullDimensions?: DimensionsFlag;
excludeStatusBar?: boolean;
rounded?: boolean;
deviceInfo?: boolean;
updateForInactiveScreens?: boolean;
};
export type Context = "window" | "screen";
export type UseDimensions = (
context?: Context,
fullDimensions?: DimensionsFlag | Options
) => RNDimensions;