UNPKG

@chayns-components/gallery

Version:

A set of beautiful React components for developing your own applications with chayns.

48 lines (47 loc) 1.35 kB
import { type FileItem } from '@chayns-components/core'; import { FC } from 'react'; import { GalleryViewMode } from '../types/gallery'; export type GalleryProps = { /** * Whether drag and drop is allowed or not */ allowDragAndDrop?: boolean; /** * The message that should be displayed if a File is already given. */ doubleFileDialogMessage?: string; /** * The minimum width of a file in the edit mode */ fileMinWidth?: number; /** * Images and videos which should be displayed */ files?: FileItem[]; /** * Whether images and videos can be edited */ isEditMode?: boolean; /** * The maximum amount of images and videos that can be uploaded. */ maxFiles?: number; /** * Function to be executed when files are added and uploaded */ onAdd?: (file: FileItem) => void; /** * Function to be executed when the count of files are changed. Needed to check if all files are uploaded */ onFileCountChange?: (fileCount: number) => void; /** * Function to be executed when a file is removed */ onRemove?: (file: FileItem) => void; /** * The mode how the images should be displayed. */ viewMode?: GalleryViewMode; }; declare const Gallery: FC<GalleryProps>; export default Gallery;