choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
65 lines (64 loc) • 1.84 kB
TypeScript
import { Component, CSSProperties } from 'react';
import ConfigContext, { ConfigContextValue } from '../config-provider/ConfigContext';
export declare type CarouselEffect = 'scrollx' | 'fade';
export interface CarouselProps {
effect?: CarouselEffect;
dots?: boolean;
vertical?: boolean;
autoplay?: boolean;
easing?: string;
beforeChange?: (from: number, to: number) => void;
afterChange?: (current: number) => void;
style?: CSSProperties;
prefixCls?: string;
accessibility?: boolean;
nextArrow?: HTMLElement | any;
prevArrow?: HTMLElement | any;
pauseOnHover?: boolean;
className?: string;
adaptiveHeight?: boolean;
arrows?: boolean;
autoplaySpeed?: number;
centerMode?: boolean;
centerPadding?: string | any;
cssEase?: string | any;
dotsClass?: string;
draggable?: boolean;
fade?: boolean;
focusOnSelect?: boolean;
infinite?: boolean;
initialSlide?: number;
lazyLoad?: boolean;
rtl?: boolean;
slide?: string;
slidesToShow?: number;
slidesToScroll?: number;
speed?: number;
swipe?: boolean;
swipeToSlide?: boolean;
touchMove?: boolean;
touchThreshold?: number;
variableWidth?: boolean;
useCSS?: boolean;
slickGoTo?: number;
}
export default class Carousel extends Component<CarouselProps> {
static displayName: string;
static get contextType(): typeof ConfigContext;
static defaultProps: {
dots: boolean;
arrows: boolean;
draggable: boolean;
};
context: ConfigContextValue;
innerSlider: any;
private slick;
private onWindowResized;
componentDidMount(): void;
componentWillUnmount(): void;
saveSlick: (node: any) => void;
next(): void;
prev(): void;
goTo(slide: number): void;
render(): JSX.Element;
}