UNPKG

@tarojsx/library

Version:
16 lines (15 loc) 1.43 kB
import React from 'react'; import { ScrollViewProps } from '@tarojs/components/types/ScrollView'; export interface OuterScrollViewProps extends Omit<ScrollViewProps, 'onScroll'> { onScroll?(event: React.UIEvent): void; } export interface UseOuterScrollViewProps extends OuterScrollViewProps { width?: number | string; height?: number | string; } /** * Container scroll view hook * * Use provided width/height synthesize standard onScroll event */ export declare function useOuterScrollView({ width, height, ...outerScrollViewProps }: UseOuterScrollViewProps): React.ForwardRefExoticComponent<Pick<OuterScrollViewProps, "style" | "id" | "scrollX" | "scrollY" | "upperThreshold" | "lowerThreshold" | "scrollTop" | "scrollLeft" | "scrollIntoView" | "scrollWithAnimation" | "enableBackToTop" | "enableFlex" | "scrollAnchoring" | "refresherEnabled" | "refresherThreshold" | "refresherDefaultStyle" | "refresherBackground" | "refresherTriggered" | "onScrollToUpper" | "onScrollToLower" | "onScroll" | "onRefresherPulling" | "onRefresherRefresh" | "onRefresherRestore" | "onRefresherAbort" | "className" | "key" | "hidden" | "animation" | "onTouchStart" | "onTouchMove" | "onTouchCancel" | "onTouchEnd" | "onClick" | "onLongPress" | "onLongClick" | "onTransitionEnd" | "onAnimationStart" | "onAnimationIteration" | "onAnimationEnd" | "onTouchForceChange"> & React.RefAttributes<React.ComponentType<ScrollViewProps>>>;