forked from ReactTooltip/react-tooltip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTooltipTypes.d.ts
62 lines (52 loc) · 1.34 KB
/
TooltipTypes.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import type { ElementType, ReactNode, CSSProperties } from 'react'
import type { Middleware } from '@floating-ui/dom'
export type PlacesType = 'top' | 'right' | 'bottom' | 'left'
export type VariantType = 'dark' | 'light' | 'success' | 'warning' | 'error' | 'info'
export type WrapperType = ElementType | 'div' | 'span'
export type ChildrenType = Element | ElementType | ReactNode
export type EventsType = 'hover' | 'click'
export type PositionStrategy = 'absolute' | 'fixed'
export type Middleware = Middleware
export type DataAttribute =
| 'place'
| 'content'
| 'html'
| 'variant'
| 'offset'
| 'wrapper'
| 'events'
| 'position-strategy'
| 'delay-show'
| 'delay-hide'
| 'float'
export interface IPosition {
x: number
y: number
}
export interface ITooltip {
className?: string
classNameArrow?: string
content?: string
html?: string
place?: PlacesType
offset?: number
id?: string
variant?: VariantType
anchorId?: string
wrapper?: WrapperType
children?: ChildrenType
events?: EventsType[]
positionStrategy?: PositionStrategy
middlewares?: Middleware[]
delayShow?: number
delayHide?: number
float?: boolean
noArrow?: boolean
clickable?: boolean
style?: CSSProperties
position?: IPosition
isOpen?: boolean
setIsOpen?: (value: boolean) => void
afterShow?: () => void
afterHide?: () => void
}