react-native-scroll-into-view
Version:
React-Native port of DOMElement.scrollIntoView() web function, for ScrollView
15 lines (14 loc) • 668 B
TypeScript
import React, { ComponentType } from 'react';
import { ScrollView } from 'react-native';
import { PartialHOCConfig, PartialOptions } from './config';
declare type ScrollViewProps = React.ComponentProps<typeof ScrollView>;
declare type HOCProps = ScrollViewProps & {
scrollIntoViewOptions?: PartialOptions;
scrollEventThrottle?: number;
innerRef?: any;
contentOffset?: number;
};
export declare type WrappableComponent = ComponentType<ScrollViewProps>;
export declare type WrappedComponent = ComponentType<HOCProps>;
export declare const wrapScrollViewHOC: (ScrollViewComp: WrappableComponent, config?: PartialHOCConfig) => WrappedComponent;
export {};