UNPKG

940 BTypeScriptView Raw
1import * as React from 'react';
2import type { Settings } from '@ant-design/react-slick';
3export type CarouselEffect = 'scrollx' | 'fade';
4export type DotPosition = 'top' | 'bottom' | 'left' | 'right';
5export interface CarouselProps extends Omit<Settings, 'dots' | 'dotsClass'> {
6 effect?: CarouselEffect;
7 style?: React.CSSProperties;
8 prefixCls?: string;
9 rootClassName?: string;
10 id?: string;
11 slickGoTo?: number;
12 dotPosition?: DotPosition;
13 children?: React.ReactNode;
14 dots?: boolean | {
15 className?: string;
16 };
17 waitForAnimate?: boolean;
18}
19export interface CarouselRef {
20 goTo: (slide: number, dontAnimate?: boolean) => void;
21 next: () => void;
22 prev: () => void;
23 autoPlay: (palyType?: 'update' | 'leave' | 'blur') => void;
24 innerSlider: any;
25}
26declare const Carousel: React.ForwardRefExoticComponent<CarouselProps & React.RefAttributes<CarouselRef>>;
27export default Carousel;