import { useInView } from "react-intersection-observer";
export function InView({ className, style, root, rootMargin, threshold, triggerOnce, initialInView, fallbackInView, onChange, previewFallback, fallback, children, }) {
    const { ref, inView } = useInView({
        root,
        rootMargin,
        threshold,
        triggerOnce,
        initialInView,
        fallbackInView,
        onChange,
    });
    return (<div ref={ref} className={className} style={style}>
      {previewFallback || !inView ? fallback : children}
    </div>);
}
//# sourceMappingURL=InView.jsx.map