UNPKG

@navinc/base-react-components

Version:
9 lines 306 B
import { useContext } from 'react'; import { ToastContext } from './toast-context.js'; export const useToast = () => { const context = useContext(ToastContext); if (context) return context; throw new Error('useToast must be used within Toasts'); }; //# sourceMappingURL=use-toast.js.map