@navinc/base-react-components
Version:
Nav's Pattern Library
29 lines (28 loc) • 1.18 kB
TypeScript
import React, { ReactNode } from 'react';
export interface CarouselProps {
children: ReactNode;
infinite?: boolean;
/** Define a minimum height value for the slide container. Useful for preventing issues with the UI jumping during initial loading of assets */
minSlideHeight?: string;
/** Define a maximum height value for the slide container. */
maxSlideHeight?: string;
onSlideChange?: (args: {
activeIndex: number;
}) => void;
}
/** Hook to provide carousel functionality to any component */
export declare function useCarousel({ infinite, slides }: {
infinite: any;
slides: any;
}): {
goToSlide: (index: number) => void;
changeNavItem: (e: any) => void;
prevSlide: () => void;
nextSlide: () => void;
activeIndex: number;
slideCount: any;
};
/** Base Carousel component that can be composed into more specific carousels via prop configurations */
export declare const CarouselBase: React.FC<CarouselProps>;
declare const StyledCarouselExp: import("styled-components").StyledComponent<React.FC<CarouselProps>, import("styled-components").DefaultTheme, {}, never>;
export { StyledCarouselExp as Carousel };