@gitlab/ui
Version:
GitLab UI Components
19 lines (16 loc) • 506 B
JavaScript
import { VBTooltip } from '../../vendor/bootstrap-vue/src/directives/tooltip';
import { getGlTooltipDefaultContainer } from './container';
const patchHook = hook => (el, bindings, vnode) => {
hook(el, {
...bindings,
arg: bindings.arg || getGlTooltipDefaultContainer()
}, vnode);
};
const bind = patchHook(VBTooltip.bind);
const componentUpdated = patchHook(VBTooltip.componentUpdated);
const GlTooltipDirective = {
...VBTooltip,
bind,
componentUpdated
};
export { GlTooltipDirective };