@wonderflow/react-components
Version:
UI components from Wonderflow's Wanda design system
49 lines • 1.64 kB
TypeScript
import { AutoPlacement, BasePlacement, VariationPlacement } from '@popperjs/core/lib';
import { ReactNode } from 'react';
export declare type TooltipProps = {
/**
* Pass the content of the tooltip. It can be any valid React node.
*/
children: ReactNode;
/**
* Set the element that will be used as the trigger of the tooltip.
*/
trigger: ReactNode;
/**
* The placement of the tooltip. This is automatically handled based on
* scroll and viewport edges.
*
* The first key refers to the X axis, the second key refers to the Y axis.
* Eg: `auto-start` means the tooltip will be placed automatically on left or right
* based on the available space, and anchored at the top (start) of the trigger.
*/
placement?: AutoPlacement | BasePlacement | VariationPlacement;
/**
* Set if the tooltip should be shown or hidden.
*/
open?: boolean;
/**
* Define a delay time in milliseconds before the tooltip is shown.
*/
delay?: number;
/**
* Set the max width of the tooltip. This prevents the tooltip content
* from filling the whole screen.
*/
maxWidth?: string;
/**
* Make the tooltip interactive.
* This will allow the user to interact with the tooltip content.
*/
interactive?: boolean;
/**
* Set the trigger container to behave like inline or block element
*/
fill?: boolean;
/**
* Set the root element to render the Tooltip into.
*/
root?: HTMLElement;
};
export declare const Tooltip: FCChildrenClass<TooltipProps>;
//# sourceMappingURL=tooltip.d.ts.map