forked from marudy/react-native-responsive-screen
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js.flow
33 lines (26 loc) · 908 Bytes
/
index.js.flow
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
// @flow
import type { Component } from "react";
declare export type UseResponsiveReturnType = {
isLandscape: boolean,
isPortrait: boolean,
wp: (widthPercent: number | string) => number,
hp: (heightPercent: number | string) => number,
vw: (widthPercent: number | string) => number,
vh: (heightPercent: number | string) => number,
rem: (size?: number | string) => number,
rf: (size?: number | string) => number,
isIOS: boolean,
isAndroid: boolean,
breakpointGroup: string
};
declare export function widthPercentageToDP(
widthPercent: string | number
): number;
declare export function heightPercentageToDP(
heightPercent: string | number
): number;
declare export function listenOrientationChange(
screenClassComponent: Component<any, any>
): void;
declare export function removeOrientationListener(): void;
declare export function useResponsive(): UseResponsiveReturnType;