/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
import React from 'react';
/**
* Context for shared data, intended as a mechanism for sharing between
* a host application that uses `usePlugins()` and its hosted plugin modules.
*/
const PluginContext = React.createContext({});
/**
* Convenience function that returns a component that provides the passed
* `value` as context.
*/
export const Component = (value) => ({children}) => (
<PluginContext.Provider value={value}>{children}</PluginContext.Provider>
);
export default PluginContext;