1import * as React from 'react'; 2import { 3 NativeSyntheticEvent, 4 StyleProp, 5 ViewProps, 6 ViewStyle, 7} from 'react-native'; 8 9export type Edge = 'top' | 'right' | 'bottom' | 'left'; 10 11export interface EdgeInsets { 12 top: number; 13 right: number; 14 bottom: number; 15 left: number; 16} 17 18export interface Rect { 19 x: number; 20 y: number; 21 width: number; 22 height: number; 23} 24 25export interface Metrics { 26 insets: EdgeInsets; 27 frame: Rect; 28} 29 30export type InsetChangedEvent = NativeSyntheticEvent<Metrics>; 31 32export type InsetChangeNativeCallback = (event: InsetChangedEvent) => void; 33 34export interface NativeSafeAreaProviderProps { 35 children?: React.ReactNode; 36 style?: StyleProp<ViewStyle>; 37 onInsetsChange: InsetChangeNativeCallback; 38} 39 40export type NativeSafeAreaViewProps = ViewProps & { 41 children?: React.ReactNode; 42 mode?: 'padding' | 'margin'; 43 edges?: ReadonlyArray<Edge>; 44}; 45