mongodb-chatbot-ui
Version:
UI React components for the MongoDB Chatbot Framework
23 lines (22 loc) • 446 B
JavaScript
import { j as r } from "./jsx-runtime.js";
import { createContext as u, useContext as a, useState as x, useMemo as k } from "react";
const y = {
hotkey: null,
setHotkey: () => {
}
}, e = u(
y
);
function C({
children: o
}) {
const [t, n] = x(null), s = k(() => ({ hotkey: t, setHotkey: n }), [t]);
return /* @__PURE__ */ r.jsx(e.Provider, { value: s, children: o });
}
function H() {
return a(e);
}
export {
C as H,
H as u
};