UNPKG

@magicbell/magicbell-react

Version:

React components for building a notification inbox for your app

27 lines (26 loc) 925 B
import { Placement } from '@floating-ui/react'; import React, { ReactNode } from 'react'; import { NotificationInboxProps } from '../NotificationInbox/index.js'; export interface Props extends NotificationInboxProps { isOpen: boolean; toggle?: () => void; launcherRef: React.RefObject<Element>; placement?: Placement; offset?: number | { mainAxis?: number; crossAxis?: number; }; arrowPadding?: number; width?: number; closeOnClickOutside?: boolean; hideArrow?: boolean; layout?: string[]; children: ReactNode | ReactNode[]; } /** * Notification inbox in a popover. * * @example * <FloatingNotificationInbox height={400} toggle={() => void} isOpen /> */ export default function FloatingInboxContainer({ launcherRef, isOpen, toggle, placement, offset: offsetProp, width, closeOnClickOutside, hideArrow, arrowPadding, children, }: Props): React.JSX.Element;