Created
November 22, 2018 14:25
-
-
Save michelalbers/1788251bf59db732b55ad54534d6a346 to your computer and use it in GitHub Desktop.
react-photoswipe TypeScript typings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'react-photoswipe' { | |
import * as React from 'react'; | |
export interface PhotoSwipeGalleryItem { | |
src: string; | |
thumbnail: string; | |
w: number; | |
h: number; | |
title: string; | |
} | |
export interface PhotoSwipeProps { | |
afterChange?: () => void; | |
beforeChange?: () => void; | |
className?: string; | |
close?: () => void; | |
destroy?: () => void; | |
gettingData?: () => void; | |
id?: string; | |
imageLoadComplete?: () => void; | |
initialZoomIn?: () => void; | |
initialZoomInEnd?: () => void; | |
initialZoomOut?: () => void; | |
initialZoomOutEnd?: () => void; | |
isOpen: boolean; | |
items: PhotoSwipeGalleryItem[]; | |
mouseUsed?: () => void; | |
onClose?: () => void; | |
options?: any; | |
parseVerticalMargin?: () => void; | |
preventDragEvent?: () => void; | |
resize?: () => void; | |
shareLinkClick?: () => void; | |
unbindEvents?: () => void; | |
updateScrollOffset?: () => void; | |
} | |
export interface PhotoSwipeGalleryProps extends PhotoSwipeProps { | |
thumbnailContent: (PhotoSwipeGalleryItem) => React.ReactNode; | |
} | |
export class PhotoSwipe extends React.Component<PhotoSwipeProps> { render(): JSX.Element; } | |
export class PhotoSwipeGallery extends React.Component<PhotoSwipeGalleryProps> { render(): JSX.Element; } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment