forked from akiran/react-slick
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
62 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,94 @@ | ||
// Type definitions for react-slick 0.23 | ||
// Project: https://github.com/akiran/react-slick | ||
// Definitions by: Andrey Balokha <https://github.com/andrewBalekha> | ||
// Giedrius Grabauskas <https://github.com/GiedriusGrabauskas> | ||
// Andrew Makarov <https://github.com/r3nya> | ||
// Shannor Trotty <https://github.com/Shannor> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.8 | ||
|
||
import * as React from "react"; | ||
|
||
type ComponentConstructor<TProps> = | ||
| React.ComponentClass<TProps> | ||
| React.FunctionComponent<TProps>; | ||
|
||
export interface CustomArrowProps { | ||
className?: string; | ||
style?: React.CSSProperties; | ||
onClick?: React.MouseEventHandler<any>; | ||
currentSlide?: number; | ||
slideCount?: number; | ||
className?: string | undefined; | ||
style?: React.CSSProperties | undefined; | ||
onClick?: React.MouseEventHandler<any> | undefined; | ||
currentSlide?: number | undefined; | ||
slideCount?: number | undefined; | ||
} | ||
|
||
export interface ResponsiveObject { | ||
breakpoint: number; | ||
settings: "unslick" | Settings; | ||
} | ||
|
||
export interface InnerSlider { | ||
list?: HTMLDivElement; | ||
} | ||
|
||
export type SwipeDirection = "left" | "down" | "right" | "up" | string; | ||
|
||
export type LazyLoadTypes = "ondemand" | "progressive"; | ||
export type LazyLoadTypes = "ondemand" | "progressive" | "anticipated"; | ||
|
||
export interface Settings { | ||
accessibility?: boolean; | ||
adaptiveHeight?: boolean; | ||
accessibility?: boolean | undefined; | ||
adaptiveHeight?: boolean | undefined; | ||
afterChange?(currentSlide: number): void; | ||
appendDots?(dots: React.ReactNode): JSX.Element; | ||
arrows?: boolean; | ||
asNavFor?: Slider; | ||
autoplaySpeed?: number; | ||
autoplay?: boolean; | ||
appendDots?(dots: React.ReactNode): React.JSX.Element; | ||
arrows?: boolean | undefined; | ||
asNavFor?: Slider | undefined; | ||
autoplaySpeed?: number | undefined; | ||
autoplay?: boolean | undefined; | ||
beforeChange?(currentSlide: number, nextSlide: number): void; | ||
centerMode?: boolean; | ||
centerPadding?: string; | ||
className?: string; | ||
style?: React.CSSProperties; | ||
cssEase?: string; | ||
customPaging?(index: number): JSX.Element; | ||
dotsClass?: string; | ||
dots?: boolean; | ||
draggable?: boolean; | ||
easing?: string; | ||
edgeFriction?: number; | ||
fade?: boolean; | ||
focusOnSelect?: boolean; | ||
infinite?: boolean; | ||
initialSlide?: number; | ||
lazyLoad?: LazyLoadTypes; | ||
nextArrow?: JSX.Element; | ||
centerMode?: boolean | undefined; | ||
centerPadding?: string | undefined; | ||
children?: React.ReactNode; | ||
className?: string | undefined; | ||
cssEase?: string | undefined; | ||
customPaging?(index: number): React.JSX.Element; | ||
dotsClass?: string | undefined; | ||
dots?: boolean | undefined; | ||
draggable?: boolean | undefined; | ||
easing?: string | undefined; | ||
edgeFriction?: number | undefined; | ||
fade?: boolean | undefined; | ||
focusOnSelect?: boolean | undefined; | ||
infinite?: boolean | undefined; | ||
initialSlide?: number | undefined; | ||
lazyLoad?: LazyLoadTypes | undefined; | ||
nextArrow?: React.JSX.Element | undefined; | ||
onEdge?(swipeDirection: SwipeDirection): void; | ||
onInit?(): void; | ||
onLazyLoad?(slidesToLoad: number[]): void; | ||
onReInit?(): void; | ||
onSwipe?(swipeDirection: SwipeDirection): void; | ||
pauseOnDotsHover?: boolean; | ||
pauseOnFocus?: boolean; | ||
pauseOnHover?: boolean; | ||
prevArrow?: JSX.Element; | ||
responsive?: ResponsiveObject[]; | ||
rows?: number; | ||
rtl?: boolean; | ||
slide?: string; | ||
slidesPerRow?: number; | ||
slidesToScroll?: number; | ||
slidesToShow?: number; | ||
speed?: number; | ||
swipeToSlide?: boolean; | ||
swipe?: boolean; | ||
pauseOnDotsHover?: boolean | undefined; | ||
pauseOnFocus?: boolean | undefined; | ||
pauseOnHover?: boolean | undefined; | ||
prevArrow?: React.JSX.Element | undefined; | ||
responsive?: ResponsiveObject[] | undefined; | ||
rows?: number | undefined; | ||
rtl?: boolean | undefined; | ||
slide?: string | undefined; | ||
slidesPerRow?: number | undefined; | ||
slidesToScroll?: number | undefined; | ||
slidesToShow?: number | undefined; | ||
speed?: number | undefined; | ||
swipeToSlide?: boolean | undefined; | ||
swipe?: boolean | undefined; | ||
swipeEvent?(swipeDirection: SwipeDirection): void; | ||
touchMove?: boolean; | ||
touchThreshold?: number; | ||
useCSS?: boolean; | ||
useTransform?: boolean; | ||
variableWidth?: boolean; | ||
vertical?: boolean; | ||
verticalSwiping?: boolean; | ||
waitForAnimate?: boolean; | ||
touchMove?: boolean | undefined; | ||
touchThreshold?: number | undefined; | ||
useCSS?: boolean | undefined; | ||
useTransform?: boolean | undefined; | ||
variableWidth?: boolean | undefined; | ||
vertical?: boolean | undefined; | ||
verticalSwiping?: boolean | undefined; | ||
waitForAnimate?: boolean | undefined; | ||
} | ||
|
||
declare class Slider extends React.Component<Settings, never> { | ||
innerSlider?: InnerSlider | undefined; | ||
slickNext(): void; | ||
slickPause(): void; | ||
slickPlay(): void; | ||
slickPrev(): void; | ||
slickGoTo(slideNumber: number, dontAnimate?: boolean): void; | ||
} | ||
|
||
export default Slider; | ||
export default Slider; |