@payfit/unity-components
Version:
18 lines (17 loc) • 496 B
JavaScript
import { createContext as e, useContext as t } from "react";
import { jsx as n } from "react/jsx-runtime";
//#region src/components/toast/Toast.context.tsx
var r = e({ inline: !0 });
function i({ inline: e, children: t }) {
return /* @__PURE__ */ n(r.Provider, {
value: { inline: e },
children: t
});
}
function a() {
let e = t(r);
if (!e) throw Error("useToastContext must be used within an ToastProvider");
return e;
}
//#endregion
export { i as ToastProvider, a as useToastContext };