forked from react-navigation/react-native-safe-area-view
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js.flow
More file actions
29 lines (23 loc) · 872 Bytes
/
index.js.flow
File metadata and controls
29 lines (23 loc) · 872 Bytes
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
// @flow
import type { ViewProps } from "react-native/Libraries/Components/View/ViewPropTypes";
export type SafeAreaViewForceInsetValue = "always" | "never";
export type ForceInset = {|
top?: SafeAreaViewForceInsetValue,
bottom?: SafeAreaViewForceInsetValue,
left?: SafeAreaViewForceInsetValue,
right?: SafeAreaViewForceInsetValue,
horizontal?: SafeAreaViewForceInsetValue,
vertical?: SafeAreaViewForceInsetValue
|};
export type SafeAreaViewProps = $ReadOnly<{|
...ViewProps,
forceInset?: ?ForceInset
|}>;
export default class SafeAreaView extends React$Component<SafeAreaViewProps> {}
declare export function withSafeArea(
forceInset?: ?ForceInset
): <T: React$ComponentType<*>>(WrappedComponent: T) => T;
declare export function getInset(
value: 'horizontal' | 'right' | 'left' | 'vertical' | 'top' | 'bottom',
isLandscape: boolean
): number