UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

14 lines 627 B
import { jsx as _jsx } from "react/jsx-runtime"; import React from 'react'; export const GenericComponentContext = React.createContext(null); export const GenericComponentsProvider = ({ children, value, }) => { return (_jsx(GenericComponentContext.Provider, { value: value, children: children })); }; export const useGenericComponents = () => { const context = React.useContext(GenericComponentContext); if (!context) { throw Error('Generic components context is being used without a provider or with an unsupported value'); } return context; }; //# sourceMappingURL=genericComponentsProvider.js.map