react-native-ui-lib
Version:
<p align="center"> <img src="https://user-images.githubusercontent.com/1780255/105469025-56759000-5ca0-11eb-993d-3568c1fd54f4.png" height="250px" style="display:block"/> </p> <p align="center">UI Toolset & Components Library for React Native</p> <p a
24 lines (23 loc) • 802 B
TypeScript
import { LayoutChangeEvent } from 'react-native';
export declare type ScrollEnablerProps = {
/**
* Whether the scroll is horizontal (default is false).
*/
horizontal?: boolean;
};
export declare type ScrollEnablerResultProps = {
/**
* onContentSizeChange callback (should be set to your onContentSizeChange).
*/
onContentSizeChange: (contentWidth: number, contentHeight: number) => void;
/**
* onLayout callback (should be set to your onLayout).
*/
onLayout: (event: LayoutChangeEvent) => void;
/**
* Whether the scroll should be enabled (should be set to your scrollEnabled).
*/
scrollEnabled: boolean;
};
declare const useScrollEnabler: (props?: ScrollEnablerProps) => ScrollEnablerResultProps;
export default useScrollEnabler;