@magicbell/magicbell-react
Version:
React components for building a notification inbox for your app
15 lines (14 loc) • 640 B
TypeScript
import { INotification, IRemoteNotification } from '@magicbell/react-headless';
export interface Props {
notification: IRemoteNotification;
onClick?: (notification: INotification) => void | boolean;
prose?: boolean;
}
/**
* Component that renders a notification. When the notification is clicked the
* `onClick` callback is called and the notification is marked as read.
*
* @example
* <ClickableNotification notification={notification} onClick={openActionUrl} />
*/
export default function ClickableNotification({ notification: rawNotification, onClick, prose }: Props): import("@emotion/react/jsx-runtime").JSX.Element;