@magicbell/magicbell-react
Version:
React components for building a notification inbox for your app
23 lines (22 loc) • 928 B
TypeScript
/** @jsxImportSource @emotion/react */
import { INotification, useNotifications } from '@magicbell/react-headless';
import { NotificationListItem } from '../NotificationList/NotificationList.js';
type NotificationStore = ReturnType<typeof useNotifications>;
export interface NotificationInboxContentProps {
height?: number;
onNotificationClick?: (notification: INotification) => void;
store: NotificationStore;
NotificationItem?: NotificationListItem;
}
/**
* Component that renders an infinite scroll list of notifications, or error
* messages if the list can't be fetched.
*
* @example
* <NotificationInboxContent
* store={notifications}
* onNotificationClick={openTicket}
* height={500} />
*/
export default function NotificationInboxContent({ onNotificationClick, store, height, NotificationItem, }: NotificationInboxContentProps): import("@emotion/react/jsx-runtime").JSX.Element;
export {};