UNPKG

mongodb-chatbot-ui

Version:

UI React components for the MongoDB Assistant

23 lines (22 loc) 440 B
import { jsx as s } from "react/jsx-runtime"; import { createContext as u, useState as a, useMemo as k, useContext as x } from "react"; const y = { hotkey: null, setHotkey: () => { } }, e = u( y ); function H({ children: o }) { const [t, n] = a(null), r = k(() => ({ hotkey: t, setHotkey: n }), [t]); return /* @__PURE__ */ s(e.Provider, { value: r, children: o }); } function i() { return x(e); } export { H, i as u };