import React, { type ReactNode } from 'react'; import { type UseExposureDetectionOptions } from '../hooks/useExposureDetection.js'; export interface ExposureDetectorProps extends Omit { /** * 子元素 */ children: ReactNode; /** * 曝光回调函数 */ onExposure?: () => void; /** * 包装元素的标签,默认 'div' */ as?: keyof JSX.IntrinsicElements; /** * 包装元素的 className */ className?: string; /** * 包装元素的 style */ style?: React.CSSProperties; } /** * ExposureDetector - 曝光检测器 * * @description 使用 IntersectionObserver 检测元素可见性的曝光检测组件,支持阈值和停留时间配置 * * @example * ```tsx * { * console.log('元素已曝光') * }} * > *
内容
*
* ``` */ export declare const ExposureDetector: React.FC; export default ExposureDetector;