Sha256: e150b2680eeaac820f05e970f4970b6f776d6d15daad78616862abbce9ba5a9e
Contents?: true
Size: 968 Bytes
Versions: 48
Compression:
Stored size: 968 Bytes
Contents
import { followCursor } from "@assets/js/libs/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
48 entries across 48 versions & 1 rubygems