aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/modules/tippy.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/modules/tippy.js')
-rw-r--r--web_src/js/modules/tippy.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.js
new file mode 100644
index 0000000000..6fd466cd92
--- /dev/null
+++ b/web_src/js/modules/tippy.js
@@ -0,0 +1,12 @@
+import tippy from 'tippy.js';
+
+export function createTippy(target, opts) {
+ return tippy(target, {
+ appendTo: document.body,
+ placement: 'top-start',
+ animation: false,
+ allowHTML: true,
+ arrow: `<svg width="16" height="7"><path d="m0 7 8-7 8 7Z" class="tippy-svg-arrow-outer"/><path d="m0 8 8-7 8 7Z" class="tippy-svg-arrow-inner"/></svg>`,
+ ...opts,
+ });
+}