Files
DeviceManager/src/lib/tooltip.ts
2023-07-25 19:42:18 +02:00

14 lines
297 B
TypeScript

import type {Action} from "svelte/action"
import tippy from "tippy.js"
import type {Props} from "tippy.js"
export const tooltip: Action<HTMLElement, Partial<Props>> = function (node, props) {
const instance = tippy(node, props)
return {
destroy() {
instance.destroy()
},
}
}