SafeArea.types.ts 601B

12345678910111213141516171819202122232425262728293031
  1. import { NativeSyntheticEvent, ViewStyle } from 'react-native';
  2. export interface EdgeInsets {
  3. top: number;
  4. right: number;
  5. bottom: number;
  6. left: number;
  7. }
  8. export interface Rect {
  9. x: number;
  10. y: number;
  11. width: number;
  12. height: number;
  13. }
  14. export interface Metrics {
  15. insets: EdgeInsets;
  16. frame: Rect;
  17. }
  18. export type InsetChangedEvent = NativeSyntheticEvent<Metrics>;
  19. export type InsetChangeNativeCallback = (event: InsetChangedEvent) => void;
  20. export interface NativeSafeAreaViewProps {
  21. children?: React.ReactNode;
  22. style?: ViewStyle;
  23. onInsetsChange: InsetChangeNativeCallback;
  24. }