Sha256: 063754a381a05d730b83315393111bb9cc1cee78db672a271cf6f4b88d48c44f
Contents?: true
Size: 968 Bytes
Versions: 25
Compression:
Stored size: 968 Bytes
Contents
import { followCursor } from "@assets/js/base/tippy"; export default function tippyModifiers(modifiers) { if (modifiers.length === 0) return {}; const config = { plugins: [], }; const getModifierArgument = (modifier) => { return modifiers[modifiers.indexOf(modifier) + 1]; }; if (modifiers.includes("duration")) { config.duration = parseInt(getModifierArgument("duration")); } if (modifiers.includes("delay")) { const delay = getModifierArgument("delay"); config.delay = delay.includes("-") ? delay.split("-").map((n) => parseInt(n)) : parseInt(delay); } if (modifiers.includes("debounce") && config.interactive) { config.interactiveDebounce = parseInt(getModifierArgument("debounce")); } if (modifiers.includes("theme")) { config.theme = getModifierArgument("theme"); } if (modifiers.includes("placement")) { config.placement = getModifierArgument("placement"); } return config; }
Version data entries
25 entries across 25 versions & 1 rubygems