UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

28 lines 1.32 kB
import { ButtonProps } from '@mui/material'; import { PropsWithChildren, ReactNode } from 'react'; export type HoverPopoverPlacement = 'top' | 'bottom' | 'left' | 'right'; export type HoverPopoverProps = PropsWithChildren<{ popoverContent: ReactNode; /** Optional title rendered as a sticky header above the scrollable content */ title?: string; placement?: HoverPopoverPlacement; maxWidth?: string | number; minWidth?: string | number; /** Max height of the scrollable content area. Default 400px. */ maxHeight?: string | number; actionButton?: { content: ReactNode; color?: ButtonProps['color']; variant?: ButtonProps['variant']; onClick: () => void; /** If true, closes the popover after the button is clicked */ closeOnClick?: boolean; }; }>; /** * A popover that opens when the user hovers over the trigger child and remains * open as long as the mouse is over either the trigger or the popover itself. * The content area is scrollable, avoiding any interaction with browser scroll. */ export declare function HoverPopover({ children, popoverContent, title, placement, maxWidth, minWidth, maxHeight, actionButton, }: HoverPopoverProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=HoverPopover.d.ts.map