@svelte-plugins/tooltips
Version:
A simple tooltip action and component designed for Svelte.
20 lines (16 loc) • 415 B
TypeScript
import { TooltipActionProps } from './action-tooltip';
interface ActionProps extends TooltipActionProps {
/**
* Whether to hide the tooltip when clicking outside.
* Only works when action is set to 'click'.
* @default false
*/
hideOnClickOutside?: boolean;
}
interface TooltipActions {
destroy(): void;
}
export function tooltip(
element: HTMLElement,
props: ActionProps
): TooltipActions;