Add children

This commit is contained in:
jrasmusbm
2018-08-29 12:06:06 +02:00
parent b553b09b38
commit 38733696c8
2 changed files with 6 additions and 2 deletions
+3
View File
@@ -28,6 +28,9 @@ interface Props {
resizeDelay?: number;
resizeThrottle?: number;
delayedCall?: boolean;
children?: (
args: { isVisible: boolean; visibilityRect?: Shape }
) => React.ReactNode;
}
declare const ReactVisibilitySensor: React.StatelessComponent<Props>;
@@ -20,6 +20,7 @@ const component = (
resizeCheck={bool}
resizeDelay={num}
resizeThrottle={num}
delayedCall={bool}
/>
delayedCall={bool}>
{({ isVisible: bool, visibilityRect: shape }) => <div />}
</ReactVisibilitySensor>
);