import { createContext } from 'react'; import { NotificationPayload } from './types'; export type NotificationContextType = { notifications: NotificationPayload[]; addNotification: (notification: NotificationPayload) => void; takeNotification: () => NotificationPayload | void; resetNotifications: () => void; }; /** * Context for the notification state and modifiers * * @example // display notifications * import { useNotificationContext } from 'mv-tmp'; * * const App = () => { * const { notifications } = useNotificationContext(); * return ( *