@wonderflow/react-components
Version:
UI components from Wonderflow's Wanda design system
62 lines • 2.17 kB
TypeScript
import { AutoPlacement, BasePlacement, VariationPlacement } from '@popperjs/core';
import { ReactNode } from 'react';
export declare type PopoverProps = {
/**
* The content of the popover to display when the popover is open.
*/
children: ReactNode;
/**
/**
* The element to use as the trigger for the popover.
*/
trigger: ReactNode;
/**
* The distance from the trigger to the popover.
*/
offset?: number;
/**
* The placement of the popover. This is automatically handled based on
* scroll and viewport edges. By default the popover is anchored at
* the beginning of the trigger.
*
* The first key refers to the X axis, the second key refers to the Y axis.
* Eg: `auto-start` means the popover 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;
/**
* Enable or disable the itneraction on the trigger.
*/
disabled?: boolean;
/**
* Callback triggered when the popover state changes.
* It returns the new `boolean` state.
*/
onOpenChange?: (open: boolean) => void;
/**
* Programmatically open or close the popover. If set to `true`, the popover
* will be open when rendered. This make the popover a controlled component.
*/
open?: boolean;
/**
* Enable or disable the auto close of the popover when clicking outside of it.
*/
closeOnOutsideClick?: boolean;
/**
* Set the popover element the same with of the trigger element.
*/
matchTriggerWidth?: boolean;
/**
* Auto close the popover when clicking inside of it.
*/
closeOnInsideClick?: boolean;
/**
* Set the root element to render the Popover into.
*/
root?: HTMLElement;
};
export declare const Popover: import("react").ForwardRefExoticComponent<{
style?: Record<string, any> | undefined;
className?: string | undefined;
} & PopoverProps & import("react").RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=popover.d.ts.map