@material-tailwind/html
Version:
Material Tailwind is an open-source library that uses the power of Tailwind CSS and React to help you build unique web projects faster and easier. The stunning design inspired by Material Design is a bonus!
47 lines (46 loc) • 994 B
TypeScript
/**
* Configuration options for the Popover component.
*/
export interface PopoverConfig {
/**
* The placement of the popover relative to the trigger.
*/
placement?: string;
/**
* Custom classes to apply to the popover element.
*/
popoverClass?: string;
/**
* Plain text content for the popover.
*/
content?: string | HTMLElement;
/**
* Whether the popover is open by default.
*/
openByDefault?: boolean;
/**
* Offset for the popover position.
*/
offset?: [number, number];
}
/**
* Interface for the Popover instance.
*/
export interface IPopover {
/**
* Opens the popover programmatically.
*/
open(): void;
/**
* Closes the popover programmatically.
*/
close(): void;
/**
* Toggles the popover's visibility programmatically.
*/
toggle(): void;
/**
* Destroys the Popover instance and cleans up resources.
*/
destroy(): void;
}