UNPKG

react-photoswipe-gallery

Version:

React component wrapper around PhotoSwipe

56 lines (55 loc) 1.16 kB
import { FC } from 'react'; import { ItemRef } from './types'; interface ChildrenFnProps { /** * Required `ref` object to any html node of item * * Can be omitted if there is only one item in gallery */ ref: ItemRef; /** * Function that opens the gallery at the current item's index */ open: () => void; } export interface ItemProps { /** * Render prop for exposing Gallery API */ children: (props: ChildrenFnProps) => JSX.Element; /** * Url of original image */ original?: string; /** * Url of thumbnail */ thumbnail?: string; /** * Width of original image */ width?: string | number; /** * Height of original image */ height?: string | number; /** * Title for Default UI */ title?: string; /** * Html content, if you need to use it as modal */ html?: string; /** * Item ID, for hash navigation */ id?: string | number; } /** * Gallery item * * Should be a children of Gallery or CustomGallery component */ export declare const Item: FC<ItemProps>; export {};