@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
19 lines • 927 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.useThemeInformation = exports.ThemeInformationProvider = exports.ThemeInformationContext = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
exports.ThemeInformationContext = (0, react_1.createContext)(null);
const ThemeInformationProvider = ({ children, value, }) => {
return ((0, jsx_runtime_1.jsx)(exports.ThemeInformationContext.Provider, { value: value, children: children }));
};
exports.ThemeInformationProvider = ThemeInformationProvider;
const useThemeInformation = () => {
const context = (0, react_1.useContext)(exports.ThemeInformationContext);
if (!context) {
throw new Error('should use useThemeInformation into ThemeInformationProvider');
}
return context;
};
exports.useThemeInformation = useThemeInformation;
//# sourceMappingURL=themeInformation.js.map