UNPKG

@zenithui/toast

Version:

A modern, lightweight toast notification system for React applications. ZenithUI Toast provides a simple and customizable way to display notifications, alerts, and messages to users with smooth animations and flexible styling options.

9 lines (8 loc) 403 B
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react"; const ToastContext = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createContext)(void 0); const useToast = ()=>{ const context = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(ToastContext); if (!context) throw new Error("Toast must be used within a ToastProvider"); return context; }; export { ToastContext, useToast };