wix-style-react
Version:
wix-style-react
120 lines • 4.97 kB
TypeScript
export default Carousel;
declare class Carousel extends React.Component<any, any, any> {
static displayName: string;
static propTypes: {
/** Applies a data-hook HTML attribute that can be used in the tests */
dataHook: PropTypes.Requireable<string>;
/** Specifies a CSS class name to be appended to the component’s root element */
className: PropTypes.Requireable<string>;
/** Defines an array of objects where each contains the `src` of an image (in `<img src="your_src" />`) */
images: PropTypes.Requireable<any[]>;
/** Sets the image's position */
imagesPosition: PropTypes.Requireable<string>;
/** Sets the image’s fit */
imagesFit: PropTypes.Requireable<string>;
/** Accepts any component as a child item. Most commonly used to display `<Card/>`, `<Image/>` or video files. */
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** Sets the skin of the control (next / previous) buttons */
buttonSkin: PropTypes.Requireable<string>;
/** Drops a shadow below the control buttons */
showControlsShadow: PropTypes.Requireable<boolean>;
/** Loops images endlessly */
infinite: PropTypes.Requireable<boolean>;
/** Auto-plays images */
autoplay: PropTypes.Requireable<boolean>;
/** Controls if the bottom dots are visible or hidden */
dots: PropTypes.Requireable<boolean>;
/** Shows one slide at a time (default) or stacks one slide after another horizontally */
variableWidth: PropTypes.Requireable<boolean>;
/** Sets the slide to start a presentation with */
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 control buttons’ position */
controlsPosition: PropTypes.Requireable<string>;
/** Sets the control buttons’ size */
controlsSize: PropTypes.Requireable<string>;
/** Controls if the next / previous control buttons are visible, hidden or disabled at the start and end of the slideshow */
controlsStartEnd: PropTypes.Requireable<string>;
};
static defaultProps: {
infinite: boolean;
dots: boolean;
variableWidth: boolean;
initialSlideIndex: number;
images: never[];
imagesPosition: string;
imagesFit: string;
buttonSkin: string;
controlsPosition: string;
controlsSize: string;
controlsStartEnd: string;
showControlsShadow: boolean;
};
constructor(props: any);
state: {
sliderSettings: {
infinite: any;
autoplay: any;
speed: number;
autoplaySpeed: number;
initialSlide: any;
dots: any;
slidesToShow: number;
slidesToScroll: number;
variableWidth: any;
afterChange: any;
beforeChange: any;
nextArrow: React.JSX.Element;
prevArrow: React.JSX.Element;
arrows: boolean;
appendDots: (pages: any) => React.JSX.Element;
customPaging: (i: any) => React.JSX.Element;
};
loadedImages: never[];
};
sliderRef: React.RefObject<any>;
render(): React.JSX.Element;
leftIconByControlSize: (controlSize: any) => React.JSX.Element;
rightIconByControlSize: (controlSize: any) => React.JSX.Element;
/** Slide to slide by index */
slideTo: (index: any) => void;
_resolveSliderSettings: ({ infinite, autoplay, dots, variableWidth, buttonSkin, initialSlideIndex, afterChange, beforeChange, controlsPosition, controlsSize, controlsStartEnd, }: {
infinite: any;
autoplay: any;
dots: any;
variableWidth: any;
buttonSkin: any;
initialSlideIndex: any;
afterChange: any;
beforeChange: any;
controlsPosition: any;
controlsSize: any;
controlsStartEnd: any;
}) => {
infinite: any;
autoplay: any;
speed: number;
autoplaySpeed: number;
initialSlide: any;
dots: any;
slidesToShow: number;
slidesToScroll: number;
variableWidth: any;
afterChange: any;
beforeChange: any;
nextArrow: React.JSX.Element;
prevArrow: React.JSX.Element;
arrows: boolean;
appendDots: (pages: any) => React.JSX.Element;
customPaging: (i: any) => React.JSX.Element;
};
_renderImages: (images: any) => any;
_onImageLoad(src: any): void;
_isLoading(src: any): boolean;
}
import React from 'react';
import PropTypes from 'prop-types';
//# sourceMappingURL=Carousel.d.ts.map