UNPKG

@svanboxel/visibility-sensor-react-native

Version:

React Native component that helps with determining whether a component is in the viewport.

15 lines (14 loc) 453 B
import React from 'react'; export interface IDimensionData { rectTop: number; rectBottom: number; rectWidth: number; } export interface Props { /** Function that is triggered when component enters the viewport */ onChange(visible: boolean): any; /** The component that needs to be in the viewport */ children: React.ReactNode; } declare const VisibilitySensor: React.FC<Props>; export default VisibilitySensor;