Skip to content

Commit f736790

Browse files
committed
feat(demo): update demo for proper typescript support
1 parent aa6e3f9 commit f736790

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

demo/src/Tooltip.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<script setup lang="ts">
2-
import { useTooltip } from '@vingy/vueltip'
2+
import { useVueltip } from '@vingy/vueltip'
33
import { useTemplateRef } from 'vue'
44
55
const tooltipElement = useTemplateRef('tooltipElement')
66
const arrowElement = useTemplateRef('arrowElement')
77
88
const { tooltipStyles, arrowStyles, show, content } =
9-
useTooltip({
9+
useVueltip({
1010
tooltipElement,
1111
arrowElement,
1212
offset: 8,

demo/src/main.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
import Vuebugger from '@vingy/vuebugger'
2-
import { tooltipPlugin } from '@vingy/vueltip'
2+
import {
3+
vueltipDirective,
4+
vueltipPlugin,
5+
} from '@vingy/vueltip'
36
import { createPinia } from 'pinia'
47
import { createApp } from 'vue'
58
import App from './App.vue'
69
import Tooltip from './Tooltip.vue'
710

811
const app = createApp(App)
912

10-
app.use(createPinia()).use(Vuebugger).use(tooltipPlugin, {
11-
component: Tooltip,
12-
handleDialogModals: true,
13-
})
13+
app
14+
.use(createPinia())
15+
.use(Vuebugger)
16+
.use(vueltipPlugin, {
17+
component: Tooltip,
18+
handleDialogModals: true,
19+
})
20+
.directive('tooltip', vueltipDirective)
1421

1522
app.mount('#app')

0 commit comments

Comments
 (0)