-
-
Notifications
You must be signed in to change notification settings - Fork 249
Expand file tree
/
Copy pathNativeSafeAreaProvider.ts
More file actions
35 lines (32 loc) · 839 Bytes
/
NativeSafeAreaProvider.ts
File metadata and controls
35 lines (32 loc) · 839 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
30
31
32
33
34
35
import type {
DirectEventHandler,
Double,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps, HostComponent } from 'react-native';
export type Event = Readonly<{
insets: Readonly<{
top: Double;
right: Double;
bottom: Double;
left: Double;
}>;
frame: Readonly<{
x: Double;
y: Double;
width: Double;
height: Double;
}>;
}>;
// @ts-ignore
export interface NativeProps extends ViewProps {
onInsetsChange?: DirectEventHandler<Event, 'paperInsetsChange'>;
pointerEvents?: WithDefault<
'box-none' | 'none' | 'box-only' | 'auto',
'auto'
>;
}
export default codegenNativeComponent<NativeProps>(
'RNCSafeAreaProvider',
) as HostComponent<NativeProps>;