mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-01 10:09:56 +00:00
043b522ff1
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update src/shared/utils/app/convert-comment-sort-type.ts Co-authored-by: SleeplessOne1917 <abias1122@gmail.com> * prettier pass --------- Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
19 lines
432 B
TypeScript
19 lines
432 B
TypeScript
import { isBrowser } from "@utils/browser";
|
|
import tippy from "tippy.js";
|
|
|
|
export let tippyInstance: any;
|
|
|
|
if (isBrowser()) {
|
|
tippyInstance = tippy("[data-tippy-content]");
|
|
}
|
|
|
|
export function setupTippy() {
|
|
if (isBrowser()) {
|
|
tippyInstance.forEach((e: any) => e.destroy());
|
|
tippyInstance = tippy("[data-tippy-content]", {
|
|
delay: [500, 0],
|
|
// Display on "long press"
|
|
touch: ["hold", 500],
|
|
});
|
|
}
|
|
}
|