@dotcms/react
Version:
Official React Components library to render a dotCMS page.
31 lines (28 loc) • 675 B
JavaScript
"use client";
import { jsx } from 'react/jsx-runtime';
import { DotCMSPageContext } from '../../contexts/DotCMSPageContext.esm.js';
/**
* @internal
*
* Client boundary that provides the DotCMS page context to the layout tree.
* Keeping this separate from DotCMSLayoutBody allows the layout to remain
* a server component while only the context provider runs on the client.
*/
function DotCMSPageProvider({
page,
components,
mode,
slots,
children
}) {
return jsx(DotCMSPageContext.Provider, {
value: {
pageAsset: page,
userComponents: components,
mode,
slots
},
children: children
});
}
export { DotCMSPageProvider };