v8-ui-components
Version:
A component lib for v8 storefront apps
55 lines (54 loc) • 1.68 kB
TypeScript
import { IThemeInterface } from "v8-theme-interfaces/lib/theme.interfaces";
import { IActiveViewPort, IColumnGap, IShowPreviews } from "../Carousel.interfaces";
import { ReactElement } from "react";
export interface ICarouselTrackProps {
activeSlideCount: number;
smallCarouselEnabled: boolean;
itemsToRender: ReactElement[];
dragThreshold: number;
animatedTransitions: boolean;
previewScaleFactor: number;
previousElement: () => void;
nextElement: () => void;
previousElementIndex: number;
currentElementIndex: number;
nextElementIndex: number;
carouselEnabled: boolean;
activeViewport: IActiveViewPort;
showPreviews: boolean;
productGrid: boolean;
shouldAnimate: boolean;
carouselHeight: string;
}
export interface ICarouselTrackState {
startX: number | null;
}
export interface ITrackProps {
activeSlideCount: number;
shouldAnimate: boolean;
theme: IThemeInterface;
}
export interface CarouselItemStyledProps extends ICarouselItemBaseStyledProps {
isActive: boolean;
previewScaleFactor: number;
type: "natural" | "preClone" | "postClone";
carouselHeight: string;
isSingleSlide: boolean;
}
export interface ICarouselItemBaseStyledProps {
shouldAnimate: boolean;
productGrid: boolean;
}
export interface ICarouselItemInnerStyledProps {
productGrid: boolean;
}
export interface ICarouselItemProps {
isActive: boolean;
previewScaleFactor: number;
showPreviews: IShowPreviews;
shouldAnimate: boolean;
columnGap: IColumnGap;
}
export interface ICarouselItemInnerProps {
inView: boolean;
}