UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

29 lines (28 loc) 1.29 kB
import React from 'react'; import { CarouselAlignType } from '../types/carouselAlign'; interface IUseCarousel { carouselContainerRef: React.RefObject<HTMLDivElement>; carouselContentRef: React.RefObject<HTMLDivElement>; circular: boolean; centerMode: boolean; extraPadding?: number; elements: JSX.Element[]; numElementsPerPage?: number; numElementsToSlide?: number; defaultPage: number; onePageAlign?: CarouselAlignType; disableSwipe: boolean; allowModifySliceWidth: boolean; centerExtremesWhenExtraPadding?: boolean; onRightSwipe: () => void; onLeftSwipe: () => void; onTransition?: (active: boolean) => void; } export interface IUseCarouselResponse { handlePageChange: (increment: number, animation?: boolean) => void; allowShift: React.MutableRefObject<boolean>; numPages: number; innerCurrentPage: React.MutableRefObject<number>; } export declare const useCarousel: ({ carouselContainerRef, carouselContentRef, circular, centerMode, extraPadding, elements, numElementsPerPage: numElementsPerPageProp, numElementsToSlide, defaultPage, onePageAlign, disableSwipe, allowModifySliceWidth, centerExtremesWhenExtraPadding, onRightSwipe, onLeftSwipe, onTransition, }: IUseCarousel) => IUseCarouselResponse; export {};