zero-tooltip 1.4.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +152 -152
- package/dist/types/tooltipConfig.d.ts +51 -0
- package/dist/types/tooltipLocalConfig.d.ts +10 -0
- package/dist/zero-tooltip.js +83 -79
- package/dist/zero-tooltip.umd.cjs +1 -1
- package/package.json +65 -65
- package/src/composables/useHideOnResize.ts +38 -38
- package/src/composables/useHideOnScroll.ts +60 -60
- package/src/composables/useRepositionOnResize.ts +16 -16
- package/src/index.ts +27 -27
- package/src/tooltip.ts +711 -691
- package/src/types/scrollContainer.ts +5 -5
- package/src/types/tooltipConfig.ts +91 -24
- package/src/types/tooltipLocalConfig.ts +21 -9
- package/src/types/tooltipPosition.ts +4 -4
- package/src/types/tooltipPositions.ts +10 -10
package/README.md
CHANGED
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
## zero-tooltip [](https://www.npmjs.com/package/zero-tooltip)
|
|
2
|
-
|
|
3
|
-
**zero-tooltip** is a Vue 3 simple tooltip component for displaying information text when hovering over element.
|
|
4
|
-
|
|
5
|
-
## About
|
|
6
|
-
The component is designed to enhance user interactions by providing informative tooltips when hovering over specific element by rendering overlay with given text next to it. Components settings are fully customizable.
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
# npm
|
|
12
|
-
npm install zero-tooltip
|
|
13
|
-
|
|
14
|
-
# yarn
|
|
15
|
-
yarn add zero-tooltip
|
|
16
|
-
|
|
17
|
-
# pnpm
|
|
18
|
-
pnpm install zero-tooltip
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Register plugin and import styles in `main.ts`:
|
|
22
|
-
```ts
|
|
23
|
-
import ZeroTooltip from 'zero-tooltip'
|
|
24
|
-
import 'zero-tooltip/style.css'
|
|
25
|
-
|
|
26
|
-
const app = createApp(App)
|
|
27
|
-
|
|
28
|
-
app.use(ZeroTooltip)
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Usage
|
|
32
|
-
|
|
33
|
-
Tooltip can be used with directive `v-tooltip` added on elements.
|
|
34
|
-
The given value is displayed as tooltip's text:
|
|
35
|
-
|
|
36
|
-
```html
|
|
37
|
-
<button v-tooltip="'Submits this form'">Submit</button>
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Zero dependencies
|
|
41
|
-
This component does not depend on any other package, except Vue 3
|
|
42
|
-
|
|
43
|
-
## Customization
|
|
44
|
-
Default position for tooltip is above/on top of the element that is being hovered. You can change position by passing argument to directive:
|
|
45
|
-
|
|
46
|
-
```html
|
|
47
|
-
<button v-tooltip:right="'Submits this form'">Submit</button>
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Acceptable arguments are: `left` | `top` | `right` | `bottom`. This will override tooltip default position that was set during plugin registering process.
|
|
51
|
-
|
|
52
|
-
You can also define default position globally when registering plugin:
|
|
53
|
-
|
|
54
|
-
```ts
|
|
55
|
-
app.use(ZeroTooltip, {
|
|
56
|
-
defaultPosition: 'right'
|
|
57
|
-
})
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Tooltip component is fully customizable by giving config object as options when registering tooltip plugin:
|
|
61
|
-
```ts
|
|
62
|
-
import ZeroTooltipConfig from 'zero-tooltip'
|
|
63
|
-
|
|
64
|
-
const tooltipConfig: ZeroTooltipConfig = {
|
|
65
|
-
appendTo: ... ,
|
|
66
|
-
defaultPosition: ... ,
|
|
67
|
-
positions: ... ,
|
|
68
|
-
offsetFromSource: ... ,
|
|
69
|
-
offsetFromViewport: ... ,
|
|
70
|
-
minWidth: ... ,
|
|
71
|
-
maxWidth: ... ,
|
|
72
|
-
tooltipBorderWidth: ... ,
|
|
73
|
-
tooltipClasses: ... ,
|
|
74
|
-
textClasses: ... ,
|
|
75
|
-
arrowSize: ... ,
|
|
76
|
-
arrowClasses: ... ,
|
|
77
|
-
arrowMinOffsetFromTooltipCorner: ... ,
|
|
78
|
-
zIndex: ... ,
|
|
79
|
-
showDelay: ... ,
|
|
80
|
-
hideDelay: ... ,
|
|
81
|
-
showWarnings: ... ,
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
app.use(ZeroTooltip, tooltipConfig)
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
All above settings are optional.
|
|
88
|
-
|
|
89
|
-
Tooltip can be customizable also for each usage (locally) using same config as follows:
|
|
90
|
-
```html
|
|
91
|
-
<template>
|
|
92
|
-
<button v-tooltip:right="tooltipConfig">Submit</button>
|
|
93
|
-
</template>
|
|
94
|
-
|
|
95
|
-
<script setup lang="ts">
|
|
96
|
-
import ZeroTooltipLocalConfig from 'zero-tooltip'
|
|
97
|
-
|
|
98
|
-
const tooltipConfig: ZeroTooltipLocalConfig = reactive({
|
|
99
|
-
content: 'This is tooltip',
|
|
100
|
-
appendTo: ... ,
|
|
101
|
-
defaultPosition: ... ,
|
|
102
|
-
positions: ... ,
|
|
103
|
-
offsetFromSource: ... ,
|
|
104
|
-
offsetFromViewport: ... ,
|
|
105
|
-
minWidth: ... ,
|
|
106
|
-
maxWidth: ... ,
|
|
107
|
-
tooltipBorderWidth: ... ,
|
|
108
|
-
tooltipClasses: ... ,
|
|
109
|
-
textClasses: ... ,
|
|
110
|
-
arrowSize: ... ,
|
|
111
|
-
arrowClasses: ... ,
|
|
112
|
-
arrowMinOffsetFromTooltipCorner: ... ,
|
|
113
|
-
zIndex: ... ,
|
|
114
|
-
show: ... ,
|
|
115
|
-
showDelay: ... ,
|
|
116
|
-
hideDelay: ... ,
|
|
117
|
-
alwaysOn: ... ,
|
|
118
|
-
})
|
|
119
|
-
</script>
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## ZeroTooltipConfig
|
|
123
|
-
| Property | <div style="width:260px">Default value</div> | Type | Details |
|
|
124
|
-
|---|---|---|---|
|
|
125
|
-
| appendTo | *body* | string | A valid CSS query selector to specify where Tooltip gets appended. |
|
|
126
|
-
| defaultPosition | *top* | TooltipPosition | Position of tooltip component relative to element that is being hovered. |
|
|
127
|
-
| positions | *{ <br>   left: ['left', 'right', 'top', 'bottom'], <br>   top: ['top', 'bottom', 'right', 'left'], <br>   right: ['right', 'left', 'top', 'bottom'], <br>   bottom: ['bottom', 'top', 'right', 'left'], <br> }* | TooltipPositions | Ordered list of fallback positions in case tooltip does not have enough space in default position. If none of given positions will have enough space for tooltip, then it will not be rendered. |
|
|
128
|
-
| offsetFromSource | *10* | number | Tooltip offset in `px` from element that's being hovered *(arrow size is not added to this value)* |
|
|
129
|
-
| offsetFromViewport | *20* | number | Minimal allowed tooltip offset in `px` from viewport sides |
|
|
130
|
-
| minWidth | *100* | number | Minimal tooltip width in `px` that will be allowed to render |
|
|
131
|
-
| maxWidth | *250* | number | Maximal tooltip width in `px` that will be allowed to render |
|
|
132
|
-
| tooltipBorderWidth | *0* | number | Tooltip container border width in `px` |
|
|
133
|
-
| tooltipClasses | *undefined* | string | List of classes that will be added to tooltip element |
|
|
134
|
-
| textClasses | *undefined* | string | List of classes that will be added to text element |
|
|
135
|
-
| arrowSize | *5* | number | Length of arrow hypotenuse in `px` (arrow is generated using border width property, creating square which gets divided in four triangles, thus `arrowSize` is length of square side) |
|
|
136
|
-
| arrowClasses | *undefined* | string | List of classes that will be added to arrow element |
|
|
137
|
-
| arrowMinOffsetFromTooltipCorner | *6* | number | Minimal allowed arrow offset in `px` from tooltip corner. Used in situations when tooltip does not have enough space to be centered relative to element that is being hover, thus arrow is rendered closer to one of the tooltip corners |
|
|
138
|
-
| zIndex | *1* | number | string | `z-index` css property value of tooltip |
|
|
139
|
-
| showDelay | *0* | number | Delay in milliseconds after which to show tooltip while hovering over element |
|
|
140
|
-
| hideDelay | *0* | number | Delay in milliseconds after which to hide tooltip when leaving element boundaries |
|
|
141
|
-
| showWarnings | *true* | boolean | Whether to show warning about empty tooltip text value in cases when tooltip was expected to be shown |
|
|
142
|
-
|
|
143
|
-
## ZeroTooltipLocalConfig
|
|
144
|
-
Same as [ZeroTooltipConfig](#ZeroTooltipConfig) with following additions:
|
|
145
|
-
| Property | <div style="width:260px">Default value</div> | Type | Details |
|
|
146
|
-
|---|---|---|---|
|
|
147
|
-
| content | *undefined* | string | ***REQUIRED***. Tooltip text. Text is rendered as HTML, thus it's possible to give simple HTML structure, e.g., `<h1>Tooltip text</h1>` |
|
|
148
|
-
| show | *true* | boolean | Define whether tooltip should be shown on hover (enabled/disabled)|
|
|
149
|
-
| alwaysOn | *false* | boolean | Define whether to show tooltip (on mount) without needing hover trigger |
|
|
150
|
-
|
|
151
|
-
## License
|
|
152
|
-
The license is MIT, so any extension, forking is welcome. `zero-tooltip` is designed as fully customizable, zero dependency, simple tooltip for Vue.js.
|
|
1
|
+
## zero-tooltip [](https://www.npmjs.com/package/zero-tooltip)
|
|
2
|
+
|
|
3
|
+
**zero-tooltip** is a Vue 3 simple tooltip component for displaying information text when hovering over element.
|
|
4
|
+
|
|
5
|
+
## About
|
|
6
|
+
The component is designed to enhance user interactions by providing informative tooltips when hovering over specific element by rendering overlay with given text next to it. Components settings are fully customizable.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
# npm
|
|
12
|
+
npm install zero-tooltip
|
|
13
|
+
|
|
14
|
+
# yarn
|
|
15
|
+
yarn add zero-tooltip
|
|
16
|
+
|
|
17
|
+
# pnpm
|
|
18
|
+
pnpm install zero-tooltip
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Register plugin and import styles in `main.ts`:
|
|
22
|
+
```ts
|
|
23
|
+
import ZeroTooltip from 'zero-tooltip'
|
|
24
|
+
import 'zero-tooltip/style.css'
|
|
25
|
+
|
|
26
|
+
const app = createApp(App)
|
|
27
|
+
|
|
28
|
+
app.use(ZeroTooltip)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
Tooltip can be used with directive `v-tooltip` added on elements.
|
|
34
|
+
The given value is displayed as tooltip's text:
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<button v-tooltip="'Submits this form'">Submit</button>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Zero dependencies
|
|
41
|
+
This component does not depend on any other package, except Vue 3
|
|
42
|
+
|
|
43
|
+
## Customization
|
|
44
|
+
Default position for tooltip is above/on top of the element that is being hovered. You can change position by passing argument to directive:
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<button v-tooltip:right="'Submits this form'">Submit</button>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Acceptable arguments are: `left` | `top` | `right` | `bottom`. This will override tooltip default position that was set during plugin registering process.
|
|
51
|
+
|
|
52
|
+
You can also define default position globally when registering plugin:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
app.use(ZeroTooltip, {
|
|
56
|
+
defaultPosition: 'right'
|
|
57
|
+
})
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Tooltip component is fully customizable by giving config object as options when registering tooltip plugin:
|
|
61
|
+
```ts
|
|
62
|
+
import ZeroTooltipConfig from 'zero-tooltip'
|
|
63
|
+
|
|
64
|
+
const tooltipConfig: ZeroTooltipConfig = {
|
|
65
|
+
appendTo: ... ,
|
|
66
|
+
defaultPosition: ... ,
|
|
67
|
+
positions: ... ,
|
|
68
|
+
offsetFromSource: ... ,
|
|
69
|
+
offsetFromViewport: ... ,
|
|
70
|
+
minWidth: ... ,
|
|
71
|
+
maxWidth: ... ,
|
|
72
|
+
tooltipBorderWidth: ... ,
|
|
73
|
+
tooltipClasses: ... ,
|
|
74
|
+
textClasses: ... ,
|
|
75
|
+
arrowSize: ... ,
|
|
76
|
+
arrowClasses: ... ,
|
|
77
|
+
arrowMinOffsetFromTooltipCorner: ... ,
|
|
78
|
+
zIndex: ... ,
|
|
79
|
+
showDelay: ... ,
|
|
80
|
+
hideDelay: ... ,
|
|
81
|
+
showWarnings: ... ,
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
app.use(ZeroTooltip, tooltipConfig)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
All above settings are optional.
|
|
88
|
+
|
|
89
|
+
Tooltip can be customizable also for each usage (locally) using same config as follows:
|
|
90
|
+
```html
|
|
91
|
+
<template>
|
|
92
|
+
<button v-tooltip:right="tooltipConfig">Submit</button>
|
|
93
|
+
</template>
|
|
94
|
+
|
|
95
|
+
<script setup lang="ts">
|
|
96
|
+
import ZeroTooltipLocalConfig from 'zero-tooltip'
|
|
97
|
+
|
|
98
|
+
const tooltipConfig: ZeroTooltipLocalConfig = reactive({
|
|
99
|
+
content: 'This is tooltip',
|
|
100
|
+
appendTo: ... ,
|
|
101
|
+
defaultPosition: ... ,
|
|
102
|
+
positions: ... ,
|
|
103
|
+
offsetFromSource: ... ,
|
|
104
|
+
offsetFromViewport: ... ,
|
|
105
|
+
minWidth: ... ,
|
|
106
|
+
maxWidth: ... ,
|
|
107
|
+
tooltipBorderWidth: ... ,
|
|
108
|
+
tooltipClasses: ... ,
|
|
109
|
+
textClasses: ... ,
|
|
110
|
+
arrowSize: ... ,
|
|
111
|
+
arrowClasses: ... ,
|
|
112
|
+
arrowMinOffsetFromTooltipCorner: ... ,
|
|
113
|
+
zIndex: ... ,
|
|
114
|
+
show: ... ,
|
|
115
|
+
showDelay: ... ,
|
|
116
|
+
hideDelay: ... ,
|
|
117
|
+
alwaysOn: ... ,
|
|
118
|
+
})
|
|
119
|
+
</script>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## ZeroTooltipConfig
|
|
123
|
+
| Property | <div style="width:260px">Default value</div> | Type | Details |
|
|
124
|
+
|---|---|---|---|
|
|
125
|
+
| appendTo | *body* | string | A valid CSS query selector to specify where Tooltip gets appended. |
|
|
126
|
+
| defaultPosition | *top* | TooltipPosition | Position of tooltip component relative to element that is being hovered. |
|
|
127
|
+
| positions | *{ <br>   left: ['left', 'right', 'top', 'bottom'], <br>   top: ['top', 'bottom', 'right', 'left'], <br>   right: ['right', 'left', 'top', 'bottom'], <br>   bottom: ['bottom', 'top', 'right', 'left'], <br> }* | TooltipPositions | Ordered list of fallback positions in case tooltip does not have enough space in default position. If none of given positions will have enough space for tooltip, then it will not be rendered. |
|
|
128
|
+
| offsetFromSource | *10* | number | Tooltip offset in `px` from element that's being hovered *(arrow size is not added to this value)* |
|
|
129
|
+
| offsetFromViewport | *20* | number | Minimal allowed tooltip offset in `px` from viewport sides |
|
|
130
|
+
| minWidth | *100* | number | Minimal tooltip width in `px` that will be allowed to render |
|
|
131
|
+
| maxWidth | *250* | number | Maximal tooltip width in `px` that will be allowed to render |
|
|
132
|
+
| tooltipBorderWidth | *0* | number | Tooltip container border width in `px` |
|
|
133
|
+
| tooltipClasses | *undefined* | string | List of classes that will be added to tooltip element |
|
|
134
|
+
| textClasses | *undefined* | string | List of classes that will be added to text element |
|
|
135
|
+
| arrowSize | *5* | number | Length of arrow hypotenuse in `px` (arrow is generated using border width property, creating square which gets divided in four triangles, thus `arrowSize` is length of square side) |
|
|
136
|
+
| arrowClasses | *undefined* | string | List of classes that will be added to arrow element |
|
|
137
|
+
| arrowMinOffsetFromTooltipCorner | *6* | number | Minimal allowed arrow offset in `px` from tooltip corner. Used in situations when tooltip does not have enough space to be centered relative to element that is being hover, thus arrow is rendered closer to one of the tooltip corners |
|
|
138
|
+
| zIndex | *1* | number | string | `z-index` css property value of tooltip |
|
|
139
|
+
| showDelay | *0* | number | Delay in milliseconds after which to show tooltip while hovering over element |
|
|
140
|
+
| hideDelay | *0* | number | Delay in milliseconds after which to hide tooltip when leaving element boundaries |
|
|
141
|
+
| showWarnings | *true* | boolean | Whether to show warning about empty tooltip text value in cases when tooltip was expected to be shown |
|
|
142
|
+
|
|
143
|
+
## ZeroTooltipLocalConfig
|
|
144
|
+
Same as [ZeroTooltipConfig](#ZeroTooltipConfig) with following additions:
|
|
145
|
+
| Property | <div style="width:260px">Default value</div> | Type | Details |
|
|
146
|
+
|---|---|---|---|
|
|
147
|
+
| content | *undefined* | string | ***REQUIRED***. Tooltip text. Text is rendered as HTML, thus it's possible to give simple HTML structure, e.g., `<h1>Tooltip text</h1>` |
|
|
148
|
+
| show | *true / false* | boolean | Define whether tooltip should be shown on hover (enabled/disabled). <br><br> Default value is `false` if `alwaysOn` is set, otherwise it's `true`. |
|
|
149
|
+
| alwaysOn | *false* | boolean | Define whether to show tooltip (on mount) without needing hover trigger |
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
The license is MIT, so any extension, forking is welcome. `zero-tooltip` is designed as fully customizable, zero dependency, simple tooltip for Vue.js.
|
|
@@ -1,22 +1,73 @@
|
|
|
1
1
|
import TooltipPosition from "./tooltipPosition";
|
|
2
2
|
import TooltipPositions from "./tooltipPositions";
|
|
3
3
|
type TooltipConfig = {
|
|
4
|
+
/**
|
|
5
|
+
* A valid CSS query selector to specify where Tooltip gets appended.
|
|
6
|
+
*/
|
|
4
7
|
appendTo?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Position of tooltip component relative to element that is being hovered.
|
|
10
|
+
*/
|
|
5
11
|
defaultPosition?: TooltipPosition;
|
|
12
|
+
/**
|
|
13
|
+
* Ordered list of fallback positions in case tooltip does not have enough space in default position. If none of given positions will have enough space for tooltip, then it will not be rendered.
|
|
14
|
+
*/
|
|
6
15
|
positions?: Partial<TooltipPositions>;
|
|
16
|
+
/**
|
|
17
|
+
* Tooltip offset in px from element that's being hovered *(arrow size is not added to this value)*
|
|
18
|
+
*/
|
|
7
19
|
offsetFromSource?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Minimal allowed tooltip offset in `px` from viewport sides
|
|
22
|
+
*/
|
|
8
23
|
offsetFromViewport?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Minimal tooltip width in `px` that will be allowed to render
|
|
26
|
+
*/
|
|
9
27
|
minWidth?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Maximal tooltip width in `px` that will be allowed to render
|
|
30
|
+
*/
|
|
10
31
|
maxWidth?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Tooltip container border width in `px`
|
|
34
|
+
*/
|
|
11
35
|
tooltipBorderWidth?: number;
|
|
36
|
+
/**
|
|
37
|
+
* List of classes that will be added to tooltip element
|
|
38
|
+
*/
|
|
12
39
|
tooltipClasses?: string;
|
|
40
|
+
/**
|
|
41
|
+
* List of classes that will be added to text element
|
|
42
|
+
*/
|
|
13
43
|
textClasses?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Length of arrow hypotenuse in `px` (arrow is generated using border width property, creating square which gets divided in four triangles, thus `arrowSize` is length of square side)
|
|
46
|
+
*/
|
|
14
47
|
arrowSize?: number;
|
|
48
|
+
/**
|
|
49
|
+
* List of classes that will be added to arrow element
|
|
50
|
+
*/
|
|
15
51
|
arrowClasses?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Minimal allowed arrow offset in `px` from tooltip corner. Used in situations when tooltip does not have enough space to be centered relative to element that is being hover, thus arrow is rendered closer to one of the tooltip corners
|
|
54
|
+
*/
|
|
16
55
|
arrowMinOffsetFromTooltipCorner?: number;
|
|
56
|
+
/**
|
|
57
|
+
* `z-index` css property value of tooltip
|
|
58
|
+
*/
|
|
17
59
|
zIndex?: number | string;
|
|
60
|
+
/**
|
|
61
|
+
* Delay in milliseconds after which to show tooltip while hovering over element
|
|
62
|
+
*/
|
|
18
63
|
showDelay?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Delay in milliseconds after which to hide tooltip when leaving element boundaries
|
|
66
|
+
*/
|
|
19
67
|
hideDelay?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Whether to show warning about empty tooltip text value in cases when tooltip was expected to be shown
|
|
70
|
+
*/
|
|
20
71
|
showWarnings?: boolean;
|
|
21
72
|
};
|
|
22
73
|
export default TooltipConfig;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import TooltipConfig from "./tooltipConfig";
|
|
2
2
|
type TooltipLocalConfig = {
|
|
3
|
+
/**
|
|
4
|
+
* Tooltip text. Text is rendered as HTML, thus it's possible to give simple HTML structure, e.g., `<h1>Tooltip text</h1>`
|
|
5
|
+
*/
|
|
3
6
|
content: string;
|
|
7
|
+
/**
|
|
8
|
+
* Define whether tooltip should be shown on hover (enabled/disabled). Default value is `false` if `alwaysOn` is set, otherwise it's `true`.
|
|
9
|
+
*/
|
|
4
10
|
show?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Define whether to show tooltip (on mount) without needing hover trigger
|
|
13
|
+
* If `alwaysOn` is set, `show` will be set to `false` by default.
|
|
14
|
+
*/
|
|
5
15
|
alwaysOn?: boolean;
|
|
6
16
|
} & TooltipConfig;
|
|
7
17
|
export default TooltipLocalConfig;
|