-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from jbdemonte/master
Append typescript definition file
- Loading branch information
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
declare module 'reactjs-popup' { | ||
import * as React from 'react'; | ||
|
||
type EventType = 'hover' | 'click' | 'focus'; | ||
type Position = 'top left' | 'top right' | 'bottom right' | 'bottom left' | 'right center' | 'left center' | 'top center' | 'bottom center'; | ||
|
||
interface Props { | ||
trigger: JSX.Element | ((isOpen: boolean) => JSX.Element); | ||
open?: boolean; | ||
defaultOpen?: boolean; | ||
on?: EventType | EventType[]; | ||
children: JSX.Element | ((close: () => void, isOpen: boolean) => JSX.Element); | ||
position?: Position | Position[]; | ||
offsetX?: number; | ||
offsetY?: number; | ||
arrow?: boolean; | ||
modal?: boolean; | ||
lockScroll?: boolean; | ||
closeOnDocumentClick?: boolean; | ||
closeOnEscape?: boolean; | ||
mouseEnterDelay?: number; | ||
mouseLeaveDelay?: number; | ||
onOpen?: () => any; | ||
onClose?: () => any; | ||
contentStyle?: object; | ||
overlayStyle?: object; | ||
arrowStyle?: object; | ||
keepTooltipInside?: boolean | string; | ||
} | ||
|
||
class Popup extends React.Component<Props> {} | ||
|
||
export = Popup; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
declare module 'reactjs-popup' { | ||
import * as React from 'react'; | ||
|
||
type EventType = 'hover' | 'click' | 'focus'; | ||
type Position = 'top left' | 'top right' | 'bottom right' | 'bottom left' | 'right center' | 'left center' | 'top center' | 'bottom center'; | ||
|
||
interface Props { | ||
trigger: JSX.Element | ((isOpen: boolean) => JSX.Element); | ||
open?: boolean; | ||
defaultOpen?: boolean; | ||
on?: EventType | EventType[]; | ||
children: JSX.Element | ((close: () => void, isOpen: boolean) => JSX.Element); | ||
position?: Position | Position[]; | ||
offsetX?: number; | ||
offsetY?: number; | ||
arrow?: boolean; | ||
modal?: boolean; | ||
lockScroll?: boolean; | ||
closeOnDocumentClick?: boolean; | ||
closeOnEscape?: boolean; | ||
mouseEnterDelay?: number; | ||
mouseLeaveDelay?: number; | ||
onOpen?: () => any; | ||
onClose?: () => any; | ||
contentStyle?: object; | ||
overlayStyle?: object; | ||
arrowStyle?: object; | ||
keepTooltipInside?: boolean | string; | ||
} | ||
|
||
class Popup extends React.Component<Props> {} | ||
|
||
export = Popup; | ||
} |