@trail-ui/react
Version:
37 lines (34 loc) • 1.25 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import { PopoverVariantProps, SlotsToClasses, PopoverSlots } from '@trail-ui/theme';
import { ReactNode } from 'react';
import { OverlayTriggerProps } from 'react-stately';
import { BasePopoverProps } from './base-popover.js';
import 'react-aria';
import 'react-aria-components';
import '../_utils/utils.js';
import '@react-types/shared';
interface PopoverTriggerProps extends OverlayTriggerProps {
children: ReactNode;
}
interface PopoverProps extends Omit<BasePopoverProps, 'children'>, PopoverVariantProps {
children?: ReactNode;
/**
* Whether the element should render an arrow.
* @default false
*/
showArrow?: boolean;
/**
* Classes object to style the popover and its children.
*/
classNames?: SlotsToClasses<PopoverSlots>;
/**
* Whether the popover is a menu popover.
*/
isMenuPopover?: boolean;
}
/**
* A PopoverTrigger opens a popover when a trigger element is pressed.
*/
declare function PopoverTrigger(props: PopoverTriggerProps): react_jsx_runtime.JSX.Element;
declare function Popover(props: PopoverProps): react_jsx_runtime.JSX.Element;
export { Popover, PopoverProps, PopoverTrigger, PopoverTriggerProps };