UNPKG

rc-horizontal-scroll

Version:
43 lines (42 loc) 1.28 kB
import * as React from "react"; declare class HorizontalScrollView extends React.Component<HorizontalScrollViewProps, any> { sliderRef: HTMLDivElement; isDown: boolean; startX: number; scrollLeft: number; itemWidth: number; lastItemReached: boolean; page: number; static defaultProps: { items: never[]; ItemComponent: () => void; spaceBetweenItems: string; moveSpeed: number; onLastItemReached: () => void; defaultSpace: string; itemComponentProps: {}; }; componentDidUpdate(prevProps: HorizontalScrollViewProps): void; componentWillUnmount(): void; onScroll: () => void; onMouseDown: (e: React.MouseEvent<Element, MouseEvent>) => void; onMouseMove: (e: MouseEvent) => void; onMouseUp: () => void; checkIfLastItemIsReached: () => void; render(): JSX.Element; } interface HorizontalScrollViewProps { items: any[]; ItemComponent: React.ComponentClass<{ item: any; index: number; parentProps: any; }, any>; spaceBetweenItems: string; defaultSpace: string; onLastItemReached: (page: number) => {}; moveSpeed: number; uniqueProp: string; itemComponentProps: any; } export { HorizontalScrollView };