UNPKG

1.44 kBTypeScriptView Raw
1import * as React from 'react';
2import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3export type CarouselVariant = 'dark' | string;
4export interface CarouselRef {
5 element?: HTMLElement;
6 prev: (e?: React.SyntheticEvent) => void;
7 next: (e?: React.SyntheticEvent) => void;
8}
9export interface CarouselProps extends BsPrefixProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
10 slide?: boolean;
11 fade?: boolean;
12 controls?: boolean;
13 indicators?: boolean;
14 indicatorLabels?: string[];
15 activeIndex?: number;
16 onSelect?: (eventKey: number, event: Record<string, unknown> | null) => void;
17 defaultActiveIndex?: number;
18 onSlide?: (eventKey: number, direction: 'start' | 'end') => void;
19 onSlid?: (eventKey: number, direction: 'start' | 'end') => void;
20 interval?: number | null;
21 keyboard?: boolean;
22 pause?: 'hover' | false;
23 wrap?: boolean;
24 touch?: boolean;
25 prevIcon?: React.ReactNode;
26 prevLabel?: React.ReactNode;
27 nextIcon?: React.ReactNode;
28 nextLabel?: React.ReactNode;
29 ref?: React.Ref<CarouselRef>;
30 variant?: CarouselVariant;
31}
32declare const _default: BsPrefixRefForwardingComponent<"div", CarouselProps> & {
33 Caption: BsPrefixRefForwardingComponent<"div", import("./CarouselCaption").CarouselCaptionProps>;
34 Item: BsPrefixRefForwardingComponent<"div", import("./CarouselItem").CarouselItemProps>;
35};
36export default _default;