UNPKG

@itwin/itwinui-react

Version:

A react component library for iTwinUI

36 lines (35 loc) 1.3 kB
import * as React from 'react'; export declare const CarouselContext: React.Context<{ /** * Stateful index of currently active slide. */ currentIndex: number; /** * State updater for currentIndex. */ setCurrentIndex: (index: number | ((old: number) => void)) => void; /** * Number of slides in the carousel. Gets set in `CarouselSlider` for reading in `CarouselDotsList`. */ slideCount: number; /** * State updater for slideCount. */ setSlideCount: (length: number | ((old: number) => void)) => void; /** * Prefix used for setting id for internal carousel components. */ idPrefix: string; /** * Ref object used for preventing intersection observer callback from interfering with manual slide updates. * * Should be set to true when updating slides using any manual actions (e.g. clicking buttons), and should be set to false when the slide update completes. */ isManuallyUpdating: React.MutableRefObject<boolean>; /** * Function that scrolls to the current slide. Should be called on all managed events (clicks and keydowns). */ scrollToSlide: React.MutableRefObject<(slideIndex: number, options?: { instant?: boolean; }) => void>; } | undefined>;