Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Commit

Permalink
feat: typescript declarations files (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
lexich authored and wuweiweiwu committed Jun 1, 2018
1 parent 1ba6a13 commit 357a801
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
40 changes: 40 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import * as React from 'react';

export interface ILightBoxProps {
mainSrc: string;
nextSrc?: string;
prevSrc?: string;
mainSrcThumbnail?: string;
prevSrcThumbnail?: string;
nextSrcThumbnail?: string;
onCloseRequest(): void;
onMovePrevRequest?(): void;
onMoveNextRequest?(): void;
onImageLoad?(): void;
onImageLoadError?(): void;
imageLoadErrorMessage?: React.ReactNode;
onAfterOpen?(): void;
discourageDownloads?: boolean;
animationDisabled?: boolean;
animationOnKeyInput?: boolean;
animationDuration?: number;
keyRepeatLimit?: number;
keyRepeatKeyupBonus?: number;
imageTitle?: string;
imageCaption?: string;
imageCrossOrigin?: string;
toolbarButtons?: React.ReactNode[];
reactModalStyle?: any;
reactModalProps?: any;
imagePadding?: number;
clickOutsideToClose?: boolean;
enableZoom?: boolean;
wrapperClassName?: string;
nextLabel?: string;
prevLabel?: string;
zoomInLabel?: string;
zoomOutLabel?: string;
closeLabel?: string;
}

export default class Lightbox extends React.Component<ILightBoxProps, never> { }
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
"deploy": "npm run build:demo && gh-pages -d build"
},
"main": "dist/main.js",
"typings": "index.d.ts",
"files": [
"dist",
"index.d.ts",
"style.css",
"style.css.map"
],
Expand Down

0 comments on commit 357a801

Please sign in to comment.