|
1
|
{ |
|
2
|
"description": "This component is based on the [Radix UI Tooltip](https://www.radix-ui.com/primitives/docs/components/tooltip) primitive.", |
|
3
|
"methods": [], |
|
4
|
"displayName": "Tooltip", |
|
5
|
"props": { |
|
6
|
"content": { |
|
7
|
"required": true, |
|
8
|
"tsType": { |
|
9
|
"name": "ReactReactNode", |
|
10
|
"raw": "React.ReactNode" |
|
11
|
}, |
|
12
|
"description": "The content to display in the tooltip." |
|
13
|
}, |
|
14
|
"onClick": { |
|
15
|
"required": false, |
|
16
|
"tsType": { |
|
17
|
"name": "ReactMouseEventHandler", |
|
18
|
"raw": "React.MouseEventHandler<HTMLButtonElement>", |
|
19
|
"elements": [ |
|
20
|
{ |
|
21
|
"name": "HTMLButtonElement" |
|
22
|
} |
|
23
|
] |
|
24
|
}, |
|
25
|
"description": "A function that is triggered when the tooltip is clicked." |
|
26
|
}, |
|
27
|
"side": { |
|
28
|
"required": false, |
|
29
|
"tsType": { |
|
30
|
"name": "union", |
|
31
|
"raw": "\"bottom\" | \"left\" | \"top\" | \"right\"", |
|
32
|
"elements": [ |
|
33
|
{ |
|
34
|
"name": "literal", |
|
35
|
"value": "\"bottom\"" |
|
36
|
}, |
|
37
|
{ |
|
38
|
"name": "literal", |
|
39
|
"value": "\"left\"" |
|
40
|
}, |
|
41
|
{ |
|
42
|
"name": "literal", |
|
43
|
"value": "\"top\"" |
|
44
|
}, |
|
45
|
{ |
|
46
|
"name": "literal", |
|
47
|
"value": "\"right\"" |
|
48
|
} |
|
49
|
] |
|
50
|
}, |
|
51
|
"description": "The side to position the tooltip.\n\n", |
|
52
|
"defaultValue": { |
|
53
|
"value": "top", |
|
54
|
"computed": false |
|
55
|
} |
|
56
|
}, |
|
57
|
"maxWidth": { |
|
58
|
"required": false, |
|
59
|
"tsType": { |
|
60
|
"name": "number" |
|
61
|
}, |
|
62
|
"description": "The maximum width of the tooltip.", |
|
63
|
"defaultValue": { |
|
64
|
"value": "220", |
|
65
|
"computed": false |
|
66
|
} |
|
67
|
}, |
|
68
|
"sideOffset": { |
|
69
|
"defaultValue": { |
|
70
|
"value": "8", |
|
71
|
"computed": false |
|
72
|
}, |
|
73
|
"description": "The distance in pixels between the tooltip and its trigger.", |
|
74
|
"tsType": { |
|
75
|
"name": "number" |
|
76
|
}, |
|
77
|
"required": false |
|
78
|
}, |
|
79
|
"children": { |
|
80
|
"description": "The element to trigger the tooltip." |
|
81
|
}, |
|
82
|
"open": { |
|
83
|
"description": "Whether the tooltip is currently open.", |
|
84
|
"tsType": { |
|
85
|
"name": "boolean" |
|
86
|
} |
|
87
|
}, |
|
88
|
"defaultOpen": { |
|
89
|
"description": "Whether the tooltip is open by default.", |
|
90
|
"tsType": { |
|
91
|
"name": "boolean" |
|
92
|
} |
|
93
|
}, |
|
94
|
"onOpenChange": { |
|
95
|
"description": "A function that is called when the tooltip's open state changes.", |
|
96
|
"tsType": { |
|
97
|
"name": "signature", |
|
98
|
"type": "function", |
|
99
|
"raw": "(open: boolean) => void", |
|
100
|
"signature": { |
|
101
|
"arguments": [ |
|
102
|
{ |
|
103
|
"name": "open", |
|
104
|
"type": { |
|
105
|
"name": "boolean" |
|
106
|
}, |
|
107
|
"rest": false |
|
108
|
} |
|
109
|
], |
|
110
|
"return": { |
|
111
|
"name": "void" |
|
112
|
} |
|
113
|
} |
|
114
|
} |
|
115
|
}, |
|
116
|
"delayDuration": { |
|
117
|
"description": "The time in milliseconds to delay the tooltip's appearance.", |
|
118
|
"tsType": { |
|
119
|
"name": "number" |
|
120
|
} |
|
121
|
} |
|
122
|
}, |
|
123
|
"composes": [ |
|
124
|
"Omit", |
|
125
|
"Pick" |
|
126
|
] |
|
127
|
} |