@magicbell/magicbell-react
Version:
React components for building a notification inbox for your app
20 lines (19 loc) • 604 B
TypeScript
export interface Props {
Icon?: JSX.Element;
Badge?: (props: {
count: number;
}) => JSX.Element | null;
onClick: () => void;
storeId?: string;
counter?: 'unread' | 'unseen';
}
/**
* Bell. Renders the number of unseen notifications as well. When the bell is
* clicked, all notifications are marked as seen.
*
* It must be wrapped in a {@link MagicBellThemeProvider} component.
*
* @example
* <Bell onClick={toggleNotifications} />
*/
export default function Bell({ Icon, Badge, onClick, storeId, counter }: Props): import("@emotion/react/jsx-runtime").JSX.Element;