@liveblocks/react-ui
Version:
A set of React pre-built components for the Liveblocks products. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.
45 lines (40 loc) • 1.25 kB
JavaScript
"use client";
;
var jsxRuntime = require('react/jsx-runtime');
var react = require('react');
var components = require('./components.cjs');
var overrides = require('./overrides.cjs');
const LiveblocksUIConfigContext = react.createContext({});
function useLiveblocksUIConfig() {
return react.useContext(LiveblocksUIConfigContext);
}
function LiveblocksUIConfig({
overrides: overrides$1,
components: components$1,
portalContainer,
preventUnsavedComposerChanges = true,
emojibaseUrl,
children
}) {
const liveblocksUIConfig = react.useMemo(
() => ({
portalContainer,
preventUnsavedComposerChanges,
emojibaseUrl
}),
[portalContainer, preventUnsavedComposerChanges, emojibaseUrl]
);
return /* @__PURE__ */ jsxRuntime.jsx(LiveblocksUIConfigContext.Provider, {
value: liveblocksUIConfig,
children: /* @__PURE__ */ jsxRuntime.jsx(overrides.OverridesProvider, {
overrides: overrides$1,
children: /* @__PURE__ */ jsxRuntime.jsx(components.ComponentsProvider, {
components: components$1,
children
})
})
});
}
exports.LiveblocksUIConfig = LiveblocksUIConfig;
exports.useLiveblocksUIConfig = useLiveblocksUIConfig;
//# sourceMappingURL=config.cjs.map