react-advanced-gallery
Version:
A customizable React image gallery component with Bootstrap styling, fullscreen mode, animations, and support for various media types
38 lines (37 loc) • 1.35 kB
TypeScript
import { GalleryItem, GalleryLayout, AnimationType, ThumbnailPosition } from '../types';
interface UseGalleryProps {
initialImages: GalleryItem[];
initialLayout?: GalleryLayout;
initialAnimation?: AnimationType;
initialThumbnailsPosition?: ThumbnailPosition;
initialEnableZoom?: boolean;
}
export declare const useGallery: ({ initialImages, initialLayout, initialAnimation, initialThumbnailsPosition, initialEnableZoom }: UseGalleryProps) => {
images: GalleryItem[];
selectedImage: GalleryItem | null;
currentIndex: number;
isFullscreenOpen: boolean;
zoomLevel: number;
layout: GalleryLayout;
animation: AnimationType;
thumbnailsPosition: ThumbnailPosition;
enableZoom: boolean;
openFullscreen: (image: GalleryItem) => void;
closeFullscreen: () => void;
toggleFavorite: (image: GalleryItem) => void;
removeImage: (image: GalleryItem) => void;
navigateToImage: (index: number) => void;
navigatePrev: () => void;
navigateNext: () => void;
zoomIn: () => void;
zoomOut: () => void;
resetZoom: () => void;
addImages: (newImages: GalleryItem[]) => void;
updateConfig: (config: {
layout?: GalleryLayout;
animation?: AnimationType;
thumbnailsPosition?: ThumbnailPosition;
enableZoom?: boolean;
}) => void;
};
export {};