import React from 'react'; import PropTypes from 'prop-types'; import { ComponentProps } from '../utils/types'; interface ScrollPropsBase { children?: React.ReactNode; /** * A React ref which is set to the DOM element when the component mounts and null when it unmounts. */ elementRef?: React.Ref; /** * Set this to animate to a specific scroll position. Remove this property onScrollComplete to * restore control to the user. */ left?: number; /** * A callback for when an animated update completes. Ensure the animate prop is set back to * false and restore control to the user. */ onScrollComplete?: () => void; /** * A callback for when the scroll position changes. */ onScroll?: React.UIEventHandler; /** * Prevent mouseWheel events from scrolling the page or other containers. 'window' only * stops the window from scrolling by removing the scroll bars, which has better performance * but can affect layout. */ stopScrollPropagation?: boolean | 'window'; tagName?: keyof JSX.IntrinsicElements; /** * Set this to animate to a specific scroll position. Remove this property onScrollComplete to * restore control to the user. */ top?: number; } type ScrollProps = ComponentProps; declare function Scroll({ children, elementRef, left, onScroll, onScrollComplete, stopScrollPropagation, tagName, top, ...otherProps }: ScrollProps): React.JSX.Element; declare namespace Scroll { var propTypes: { children: PropTypes.Requireable; elementRef: PropTypes.Requireable; left: PropTypes.Requireable; onScroll: PropTypes.Requireable<(...args: any[]) => any>; onScrollComplete: PropTypes.Requireable<(...args: any[]) => any>; stopScrollPropagation: PropTypes.Requireable; tagName: PropTypes.Requireable; top: PropTypes.Requireable; }; } export default Scroll;