UNPKG

1.38 kBTypeScriptView Raw
1import * as React from 'react';
2import { type ViewProps } from 'react-native';
3import type { EdgeInsets, Metrics, Rect } from './SafeArea.types';
4export declare const SafeAreaInsetsContext: React.Context<EdgeInsets | null>;
5export declare const SafeAreaFrameContext: React.Context<Rect | null>;
6export interface SafeAreaProviderProps extends ViewProps {
7 children?: React.ReactNode;
8 initialMetrics?: Metrics | null;
9 /**
10 * @deprecated
11 */
12 initialSafeAreaInsets?: EdgeInsets | null;
13}
14export declare function SafeAreaProvider({ children, initialMetrics, initialSafeAreaInsets, style, ...others }: SafeAreaProviderProps): React.JSX.Element;
15export declare function useSafeAreaInsets(): EdgeInsets;
16export declare function useSafeAreaFrame(): Rect;
17export type WithSafeAreaInsetsProps = {
18 insets: EdgeInsets;
19};
20export declare function withSafeAreaInsets<T>(WrappedComponent: React.ComponentType<(React.PropsWithoutRef<T> | T) & WithSafeAreaInsetsProps>): React.ForwardRefExoticComponent<React.PropsWithoutRef<T> & React.RefAttributes<unknown>>;
21/**
22 * @deprecated
23 */
24export declare function useSafeArea(): EdgeInsets;
25/**
26 * @deprecated
27 */
28export declare const SafeAreaConsumer: React.Consumer<EdgeInsets | null>;
29/**
30 * @deprecated
31 */
32export declare const SafeAreaContext: React.Context<EdgeInsets | null>;
33//# sourceMappingURL=SafeAreaContext.d.ts.map
\No newline at end of file