UNPKG

lune-ui-lib

Version:

Lune UI Components Library

31 lines (30 loc) 1.07 kB
import Collapse from '@mui/material/Collapse'; import { DialogProps } from '@mui/material/Dialog'; import Fade from '@mui/material/Fade'; import Grow from '@mui/material/Grow'; import Slide from '@mui/material/Slide'; import Zoom from '@mui/material/Zoom'; import { HTMLAttributes } from 'react'; type Props = { url: string; attributionUrl?: string; attributionText?: string; }; type ImageProps = Props & { type: 'image'; } & HTMLAttributes<HTMLImageElement>; type VideoProps = Props & { type: 'video'; } & HTMLAttributes<HTMLVideoElement>; type MediaProps = ImageProps | VideoProps; export interface ControlledLightboxProps { onPrevious(): unknown; onNext(): unknown; activeIndex: number; } export interface LightboxProps extends Omit<DialogProps, 'children'> { media: MediaProps[]; TransitionComponent?: typeof Collapse | typeof Fade | typeof Slide | typeof Grow | typeof Zoom; } declare const Lightbox: (props: LightboxProps & Partial<ControlledLightboxProps>) => import("react/jsx-runtime").JSX.Element; export default Lightbox;