UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

61 lines (60 loc) 2.19 kB
import React from 'react'; import { Overwrite } from '../../util/component-types'; import { ISlidePanelProps, ISlidePanelSlideProps } from '../SlidePanel/SlidePanel'; interface IInfiniteSlidePanelSlideProps extends ISlidePanelSlideProps { } export interface IInfiniteSlidePanelPropsRaw { /** The only allowed child is a render function which is passed the current slide's offset and returns the slide contents. Alternatively, you could pass one `<InfiniteSlidePanelSlide {...}>` element with the render function. The only reason do to the latter is to pass addiontal props to the slide element. */ children?: React.ReactNode | ((slideOffset: number) => React.ReactNode); /** The number of slides rendered at any given time. A good rule-of-thumb is that this should be at least 4 times the \`slidesToShow\` value. */ totalSlides: number; /** Animate slides transitions from changes in `offset`. */ isAnimated: boolean; /** Slides are rendered in a continuous loop, where the first slide repeats * after the last slide and vice-versa. DOM elements are re-ordered and * re-used. */ isLooped: boolean; Slide?: React.ReactNode; } declare type IInfiniteSlidePanelProps = Overwrite<ISlidePanelProps, IInfiniteSlidePanelPropsRaw>; export declare const InfiniteSlidePanel: { (props: IInfiniteSlidePanelProps): React.ReactElement; defaultProps: { offset: number; slidesToShow: number; onSwipe: (...args: any[]) => void; totalSlides: number; isAnimated: boolean; isLooped: boolean; }; Slide: { (_props: IInfiniteSlidePanelSlideProps): null; displayName: string; propName: string; peek: { description: string; }; }; _isPrivate: boolean; displayName: string; peek: { description: string; categories: string[]; madeFrom: string[]; }; propTypes: { className: any; children: any; offset: any; slidesToShow: any; onSwipe: any; totalSlides: any; Slide: any; }; }; export default InfiniteSlidePanel;