This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
forked from craig-andersen-zefr/react-responsive-carousel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
74 lines (64 loc) · 2.1 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Type definitions for react-responsive-carousel 3.1
// Project: https://github.com/leandrowd/react-responsive-carousel/
// Definitions by: Tatu Tamminen <https://github.com/ttamminen>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as React from "react";
export type Axis = "horizontal" | "vertical";
export type CarouselCallback = (index: number, item: React.ReactNode) => void;
export type StatusFormatter = (current: number, total: number) => string;
export interface CarouselProps {
className?: string;
showArrows?: boolean;
showStatus?: boolean;
showIndicators?: boolean;
showThumbs?: boolean;
infiniteLoop?: boolean;
selectedItem?: number;
axis?: Axis;
onChange?: CarouselCallback;
onClickItem?: CarouselCallback;
onClickThumb?: CarouselCallback;
width?: string;
useKeyboardArrows?: boolean;
autoPlay?: boolean;
stopOnHover?: boolean;
interval?: number;
transitionTime?: number;
swipeScrollTolerance?: number;
dynamicHeight?: boolean;
emulateTouch?: boolean;
statusFormatter?: StatusFormatter;
children?: React.ReactNode;
centerMode?:boolean;
centerSlidePercentage?:number;
}
export interface CarouselState {
initialized: boolean;
selectedItem: number;
hasMount: boolean;
itemSize: number;
wrapperSize: number;
cancelClick: boolean;
swiping: boolean;
}
export class Carousel extends React.Component<CarouselProps, CarouselState> {
constructor(props: CarouselProps, context: any);
render(): JSX.Element;
}
export interface ThumbsProps {
transitionTime?: number;
selectedItem?: number;
axis?: Axis;
}
export interface ThumbState {
initialized: boolean;
selectedItem: number;
hasMount: boolean;
firstItem: number;
images?: HTMLImageElement[];
}
export class Thumbs extends React.Component<ThumbsProps, ThumbState> {
constructor(props: ThumbsProps, context: any);
render(): JSX.Element;
}