reablocks
Version:
Component library for React
32 lines (30 loc) • 1.07 kB
TypeScript
import { PopoverTheme } from './PopoverTheme';
import { TooltipProps } from '../Tooltip';
import { default as React, FC } from 'react';
type FocusTargetValueOrFalse = HTMLElement | SVGElement | string | false;
type FocusTargetOrFalse = FocusTargetValueOrFalse | (() => FocusTargetValueOrFalse);
export interface PopoverProps extends Partial<Omit<TooltipProps, 'theme'>> {
/**
* Disable default padding on popover.
*/
disablePadding?: boolean;
/**
* Popover css styles.
*/
popoverStyle?: React.StyleHTMLAttributes<any>;
/**
* Popover classname.
*/
popoverClassName?: string;
/**
* Theme for the Popover.
*/
theme?: PopoverTheme;
/**
* Popover has a focus trap that by default focuses the first element in the tab order.
* With this option you can specify a different element to receive that initial focus, or use false for no initially focused element.
*/
autoFocus?: FocusTargetOrFalse | undefined | (() => void);
}
export declare const Popover: FC<PopoverProps>;
export {};