import tippy, { Props } from 'tippy.js'; import 'tippy.js/dist/tippy.css'; import './themes.scss'; export default function tippyAction(node: HTMLElement, initialProps: Partial) { const instance = tippy(node, initialProps); return { update: (props: Partial) => { instance.setProps(props); }, destroy: () => { instance.destroy(); }, }; }