UNPKG

1.02 kBTypeScriptView Raw
1import * as React from 'react';
2
3import CarouselCaption from './CarouselCaption';
4import CarouselItem from './CarouselItem';
5
6import { BsPrefixComponent } from './helpers';
7
8export interface CarouselProps {
9 bsPrefix?: string;
10 slide?: boolean;
11 fade?: boolean;
12 controls?: boolean;
13 indicators?: boolean;
14 activeIndex?: number;
15 onSelect?: (eventKey: number, event: object | null) => void;
16 defaultActiveIndex?: number;
17 onSlide?: (eventKey: number, direction: 'left' | 'right') => void;
18 onSlid?: (eventKey: number, direction: 'left' | 'right') => void;
19 interval?: number | null;
20 keyboard?: boolean;
21 pause?: 'hover' | false;
22 wrap?: boolean;
23 touch?: boolean;
24 prevIcon?: React.ReactNode;
25 prevLabel?: React.ReactNode;
26 nextIcon?: React.ReactNode;
27 nextLabel?: React.ReactNode;
28}
29
30declare class Carousel<
31 As extends React.ElementType = 'div'
32> extends BsPrefixComponent<As, CarouselProps> {
33 static Item: typeof CarouselItem;
34 static Caption: typeof CarouselCaption;
35}
36
37export default Carousel;