mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-04-21 05:38:56 +00:00
add tooltip stuff
[deploy]
This commit is contained in:
13
src/lib/tooltip.ts
Normal file
13
src/lib/tooltip.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type {Action} from "svelte/action"
|
||||
import tippy from "tippy.js"
|
||||
import type {Props} from "tippy.js"
|
||||
|
||||
export const tooltip: Action = function (node, props?: Partial<Props>) {
|
||||
const instance = tippy(node, props)
|
||||
|
||||
return {
|
||||
destroy() {
|
||||
instance.destroy()
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user