UNPKG

qt-public-ui

Version:

新设计规范下业务组件库

22 lines 695 B
import React from 'react'; import i18n from '../utils/i18n'; export var GlobalContext = React.createContext({ theme: 'analytical', i18n: i18n }); export var GlobalProvider = function GlobalProvider(props) { var children = props.children, _props$theme = props.theme, theme = _props$theme === void 0 ? 'analytical' : _props$theme, _props$trackPrefix = props.trackPrefix, trackPrefix = _props$trackPrefix === void 0 ? '' : _props$trackPrefix, newI18n = props.i18n; return /*#__PURE__*/React.createElement(GlobalContext.Provider, { value: { theme: theme, trackPrefix: trackPrefix, i18n: newI18n } }, children); }; export default GlobalContext;