-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (Typescript): Add typescript support , work done by @Metavirulent,…
… just correcting for #PR24
- Loading branch information
Jason Finch
committed
Apr 18, 2018
1 parent
0433a5e
commit 1d25cbb
Showing
2 changed files
with
72 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import * as React from "react"; | ||
|
||
export type Position = | ||
| "top" | ||
| "top-start" | ||
| "top-end" | ||
| "bottom" | ||
| "bottom-start" | ||
| "bottom-end" | ||
| "left" | ||
| "left-start" | ||
| "left-end" | ||
| "right" | ||
| "right-start" | ||
| "right-end"; | ||
export type Trigger = "mouseenter" | "focus click" | "manual"; | ||
export type Animation = "shift" | "perspective" | "fade scale" | "none"; | ||
export type Size = "small" | "regular" | "big"; | ||
export type Theme = "dark" | "light" | "transparent"; | ||
|
||
export interface TooltipProps { | ||
title?: string; | ||
disabled?: boolean; | ||
open?: boolean; | ||
useContext?: boolean; | ||
onRequestClose?: () => void; | ||
position?: Position; | ||
trigger?: Trigger; | ||
tabIndex?: number; | ||
interactive?: boolean; | ||
interactiveBorder?: number; | ||
delay?: number; | ||
hideDelay?: number; | ||
animation?: Animation; | ||
arrow?: boolean; | ||
arrowSize?: Size; | ||
animateFill?: boolean; | ||
duration?: number; | ||
hideDuration?: number; | ||
distance?: number; | ||
offset?: number; | ||
hideOnClick?: boolean | "persistent"; | ||
multiple?: boolean; | ||
followCursor?: boolean; | ||
inertia?: boolean; | ||
transitionFlip?: boolean; | ||
popperOptions?: any; | ||
html?: React.ReactElement<any>; | ||
unmountHTMLWhenHide?: boolean; | ||
size?: Size; | ||
sticky?: boolean; | ||
stickyDuration?: boolean; | ||
This comment has been minimized.
Sorry, something went wrong. |
||
beforeShown?: () => void; | ||
shown?: () => void; | ||
beforeHidden?: () => void; | ||
hidden?: () => void; | ||
theme?: Theme; | ||
className?: string; | ||
style?: React.CSSProperties; | ||
} | ||
|
||
export class Tooltip extends React.Component<TooltipProps> {} | ||
|
||
export declare function withTooltip<P>( | ||
component: React.ComponentType<P>, | ||
options: TooltipProps | ||
); |
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
👍 fix for this typo #133