UNPKG

elfen-component-swiper

Version:

elfen component swiper

81 lines (80 loc) 2.33 kB
/// <reference types="react" /> import * as React from 'react'; export interface Props { style?: React.CSSProperties; className?: number; wrapperStyle?: React.CSSProperties; wrapperClassName?: string; height?: number; width?: number; threshold?: number; speed?: number; defaultIndex?: number; index?: number; direction?: 'vertical' | 'horizontal'; indicators?: boolean; autoplay?: boolean; loop?: boolean; onChange?: (ogIndex, currentIndex) => void; indicatorsStyle?: React.CSSProperties; indicatorsClassName?: string; indicatorsSize?: number | string; indicatorsOverlayColor?: string; indicatorsActiveColor?: string; indicatorsPosition?: 'top' | 'right' | 'bottom' | 'left' | 'center'; } export interface State { containerWidth: number; containerHeight: number; currentIndex: number; touching: boolean; og: number; ogTranslate: number; touchId: any; translate: number; animating: false; } export default class Swiper extends React.PureComponent<Props, any> { static defaultProps: { height: string; width: string; defaultIndex: number; direction: string; threshold: number; speed: number; autoplay: boolean; loop: boolean; indicators: boolean; indicatorsSize: number; indicatorsOverlayColor: string; indicatorsActiveColor: string; indicatorsPosition: string; }; container: any; it: any; state: { containerWidth: number; containerHeight: number; wrapperWidth: number; wrapperHeight: number; currentIndex: number; touching: boolean; og: number; ogTranslate: number; touchId: any; animating: boolean; translate: number; threshold: number; }; componentDidMount(): void; componentWillReceiveProps(nextProps: any): void; componentWillUnmount(): void; computeDefaultAttributes(children: any): void; updateTab: (nextIndex: any, width: any) => void; handleTouchStart: (e: any) => void; handleTouchMove: (e: any) => void; handleTouchEnd: (e: any) => void; handleAutoplay: (width: any) => void; renderPagination(): JSX.Element[]; render(): JSX.Element; }