Outlook_Addin_LLM/node_modules/@fluentui/react-shared-contexts/lib-commonjs/CustomStyleHooksContext/CustomStyleHooksContext.js

32 lines
1.2 KiB
JavaScript
Raw Normal View History

/* eslint-disable */ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
CustomStyleHooksContext: function() {
return CustomStyleHooksContext;
},
CustomStyleHooksProvider: function() {
return CustomStyleHooksProvider;
},
useCustomStyleHook: function() {
return useCustomStyleHook;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const CustomStyleHooksContext = /*#__PURE__*/ _react.createContext(undefined);
const noop = ()=>{};
const CustomStyleHooksProvider = CustomStyleHooksContext.Provider;
const useCustomStyleHook = (hook)=>{
var _React_useContext;
var _React_useContext_hook;
return (_React_useContext_hook = (_React_useContext = _react.useContext(CustomStyleHooksContext)) === null || _React_useContext === void 0 ? void 0 : _React_useContext[hook]) !== null && _React_useContext_hook !== void 0 ? _React_useContext_hook : noop;
};