1 | import type * as React from 'react';
|
2 | import type { NativeSyntheticEvent, ViewProps } from 'react-native';
|
3 | import NativeSafeAreaView from './specs/NativeSafeAreaView';
|
4 | export type Edge = 'top' | 'right' | 'bottom' | 'left';
|
5 | export type EdgeMode = 'off' | 'additive' | 'maximum';
|
6 | export type EdgeRecord = Partial<Record<Edge, EdgeMode>>;
|
7 | export type Edges = readonly Edge[] | Readonly<EdgeRecord>;
|
8 | export interface EdgeInsets {
|
9 | top: number;
|
10 | right: number;
|
11 | bottom: number;
|
12 | left: number;
|
13 | }
|
14 | export interface Rect {
|
15 | x: number;
|
16 | y: number;
|
17 | width: number;
|
18 | height: number;
|
19 | }
|
20 | export interface Metrics {
|
21 | insets: EdgeInsets;
|
22 | frame: Rect;
|
23 | }
|
24 | export type InsetChangedEvent = NativeSyntheticEvent<Metrics>;
|
25 | export type InsetChangeNativeCallback = (event: InsetChangedEvent) => void;
|
26 | export interface NativeSafeAreaProviderProps extends ViewProps {
|
27 | children?: React.ReactNode;
|
28 | onInsetsChange: InsetChangeNativeCallback;
|
29 | }
|
30 | export interface NativeSafeAreaViewProps extends ViewProps {
|
31 | children?: React.ReactNode;
|
32 | mode?: 'padding' | 'margin';
|
33 | edges?: Edges;
|
34 | }
|
35 | export type NativeSafeAreaViewInstance = InstanceType<typeof NativeSafeAreaView>;
|
36 |
|
\ | No newline at end of file |