wix-style-react
Version:
wix-style-react
108 lines • 4.63 kB
TypeScript
export default CarouselWIP;
/** The carousel component creates a slideshow for cycling through a series of content. */
declare class CarouselWIP extends React.PureComponent<any, any, any> {
static displayName: string;
static propTypes: {
/** Applied as data-hook HTML attribute that can be used in the tests */
dataHook: PropTypes.Requireable<string>;
/** A css class to be applied to the component's root element */
className: PropTypes.Requireable<string>;
/** Any element to render inside */
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** Array of objects where each contains the `src` of an image (in \<img src="your_src" /\>) */
images: PropTypes.Requireable<any[]>;
/** Sets the skin of the arrow buttons */
controlsSkin: PropTypes.Requireable<string>;
/** Show a shadow for the carousel controls */
showControlsShadow: PropTypes.Requireable<boolean>;
/** Images loop endlessly */
infinite: PropTypes.Requireable<boolean>;
/** An index of the slide to start on */
initialSlideIndex: PropTypes.Requireable<number>;
/** Index change callback. `index => ...` */
afterChange: PropTypes.Requireable<(...args: any[]) => any>;
/** Index change callback. `(oldIndex, newIndex) => ...` */
beforeChange: PropTypes.Requireable<(...args: any[]) => any>;
/** Sets the arrows position */
controlsPosition: PropTypes.Requireable<string>;
/** Sets the arrows position */
controlsSize: PropTypes.Requireable<string>;
/** Configure the start and end controls to be shown disabled or hidden. Relevant when infinite prop is set to false. */
controlsStartEnd: PropTypes.Requireable<string>;
/** Sliding behaviour type for the carousel */
slidingType: PropTypes.Requireable<string>;
/** Number of pixels for showing "peeking" cards on the edges of the carousel */
startEndOffset: PropTypes.Requireable<number>;
/** Number of pixels dividing between slides */
gutter: PropTypes.Requireable<number>;
/** Color for the gradients on the sides of the carousel */
sidesGradientColor: PropTypes.Requireable<string>;
/** Sets the images position */
imagesPosition: PropTypes.Requireable<string>;
/** Sets the images fit */
imagesFit: PropTypes.Requireable<string>;
/** Auto-playing of images */
autoplay: PropTypes.Requireable<boolean>;
/** Hide dots */
hideDots: PropTypes.Requireable<boolean>;
/** 🚧 Variable width of children */
variableWidth: PropTypes.Requireable<boolean>;
};
static defaultProps: {
children: never[];
infinite: boolean;
controlsSkin: string;
controlsStartEnd: string;
showControlsShadow: boolean;
images: never[];
initialSlideIndex: number;
controlsPosition: string;
controlsSize: string;
slidingType: string;
startEndOffset: number;
gutter: number;
hideDots: boolean;
autoplay: boolean;
};
constructor(props: any);
loadingImagesCount: number;
state: {
visibleSlides: never[];
isAnimating: boolean;
isLoading: boolean;
isLeftArrowDisabled: boolean;
isRightArrowDisabled: boolean;
isShowStartGradient: boolean;
isShowEndGradient: boolean;
};
componentDidMount(): void;
componentDidUpdate(prevProps: any): void;
_setImagesOnLoadHandlers: () => void;
_updateChildCount: () => void;
childCount: any;
_onImageLoad: () => void;
_setAutoplayTimer: (active: any) => void;
autoplayTimer: NodeJS.Timeout | undefined;
_setVisibleSlides: () => void;
_slideTo: ({ index, alignTo, immediate }?: {
index: number;
alignTo: string;
immediate: boolean;
}) => Promise<any>;
_next: () => Promise<any>;
_prev: () => Promise<any>;
_setRef: (r: any) => void;
carousel: any;
_renderLeftControl: () => false | React.JSX.Element;
_renderRightControl: () => false | React.JSX.Element;
_renderSlides: () => React.JSX.Element;
_renderLoader: () => React.JSX.Element;
_renderDots: () => React.JSX.Element;
_renderStartGradient: () => React.JSX.Element;
_renderEndGradient: () => React.JSX.Element;
render(): React.JSX.Element;
componentWillUnmount(): void;
}
import React from 'react';
import PropTypes from 'prop-types';
//# sourceMappingURL=CarouselWIP.d.ts.map