import * as React from 'react'; export class ClosablePopover extends React.PureComponent { open: () => void; close: () => void; } export interface ClosablePopoverProps { /** Controls whether the popover's content is shown or not. * When undefined, then the component is Uncontrolled, * It is initially open, and it can be closed by close-action. */ opened?: boolean; /** Controls whether the popover's content is initially opened (in Uncontrolled mode only) * @default true */ initiallyOpened?: boolean; /** The popover's target element. */ target: React.ReactNode; /** Callback to call when the popover content is requested to be opened (Uncontrolled mode only) */ onOpen?: () => void; /** Defines a callback function which is called after the popover content closes. It's called only in uncontrolled mode, when the `close` action passed to `content` is called or the mouse leaves the popover while `closeOnMouseLeave` is `true`. */ onClose?: () => void; /** Specifies whether the popover closes when the mouse leaves it. Used only in uncontrolled mode while the popover opens on hover, which is when `initiallyOpened` is `false` or after the popover was closed. * @default true */ closeOnMouseLeave?: boolean; /** The popover's content, given as a function that receives control-actions and renders the content. * In Uncontrolled mode, this function is still called only once. */ content: (actions: { close: () => void }) => React.ReactNode; /** Specifies a CSS class name to be appended to the component's root element. * @internal */ className?: string; }