@synergycodes/overflow-ui
Version:
A React library for creating node-based UIs and diagram-driven applications. Perfect for React Flow users, providing ready-to-use node templates and components that work seamlessly with React Flow's ecosystem.
27 lines (26 loc) • 825 B
TypeScript
import { useFloating, Placement, UseInteractionsReturn } from '@floating-ui/react';
export type TooltipOptions = {
/**
* If true, the component is shown at initial
*/
initialOpen?: boolean;
/**
* Tooltip placement.
*/
placement?: Placement;
/**
* If true, the component is shown.
*/
open?: boolean;
/**
* Callback fired when the component requests to be open.
*/
onOpenChange?: (open: boolean) => void;
};
export declare function useTooltip({ initialOpen, placement, open: controlledOpen, onOpenChange: setControlledOpen, }?: TooltipOptions): UseTooltipResult;
type UseTooltipResult = UseInteractionsReturn & ReturnType<typeof useFloating> & {
open: boolean;
setOpen: (open: boolean) => void;
arrowRef: React.RefObject<null>;
};
export {};