UNPKG

react-sled

Version:

react-sled is a carousel made with react-spring.

72 lines (71 loc) 1.54 kB
import { IState, TDirection, TDimension } from './types-defaults'; import { SpringConfig } from 'react-spring'; export declare type ActionType = { type: 'NEXT'; } | { type: 'PREV'; } | { type: 'SELECT'; index: number; } | { type: 'SET_PAUSE'; pause: boolean; } | { type: 'SET_DIRECTION'; direction: TDirection; } | { type: 'SET_MOUSEOVER'; pauseOnMouseOver: boolean; } | { type: 'SET_VIEWCOUNT'; count: number; } | { type: 'SET_FOCUS'; focus: boolean; } | { type: 'SET_DIMENSIONS'; dimensions: { width: number; height: number; }; } | { type: 'SET_DIMENSIONS_DOM'; dimensionsDOM: { width: TDimension; height: TDimension; }; } | { type: 'SET_PROPORTION'; proportion?: string; } | { type: 'SET_DRAGGING'; dragging: boolean; } | { type: 'SET_DRAG_DISTANCE'; dragDistance: string | number; } | { type: 'SET_AUTOPLAY'; autoPlayInterval?: number; } | { type: 'SET_CONFIG'; config: SpringConfig; } | { type: 'SET_REWIND'; rewind: boolean; } | { type: 'SET_STOPONINTERACTION'; stopOnInteraction: boolean; } | { type: 'SET_SHOWELEMENTS'; showElements: number; } | { type: 'SET_SLIDEBY'; slideBy: number; } | { type: 'SET_SLIDESTEPS'; slideSteps: number; } | { type: 'SET_SLIDERSIZE'; sliderSize: number; }; export declare function reducer(state: IState, action: ActionType): IState;