Skip to content

Commit

Permalink
feat: add FloatingVuePlugin to Nuxt runtime plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed Sep 3, 2024
1 parent f6dc077 commit 829a157
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions packages/nuxt/src/floating-vue.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { Plugin } from 'vue';
import FloatingVue from 'floating-vue';

export const FloatingVuePlugin: Plugin = {
install: (app) => {
app.use(FloatingVue, {
themes: {
'tooltip-black': {
$extend: 'tooltip',
$resetCss: true,
disposeTimeout: 100000,
},
'tooltip-white': {
$extend: 'tooltip',
$resetCss: true,
disposeTimeout: 100000,
},
}
})
}
}
2 changes: 1 addition & 1 deletion packages/nuxt/src/runtime/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineNuxtPlugin } from '#app'
import { FloatingVuePlugin } from '@morpheme/ui/src/tooltip/src/floating-vue.js'
import { FloatingVuePlugin } from '../floating-vue'

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(FloatingVuePlugin)
Expand Down

0 comments on commit 829a157

Please sign in to comment.