@elastic/eui
Version:
Elastic UI Component Library
31 lines (30 loc) • 1.49 kB
JavaScript
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { createContext } from 'react';
import { EuiThemeBorealis } from '@elastic/eui-theme-borealis';
import { DEFAULT_COLOR_MODE, getComputed } from './utils';
export var DEFAULTS = {
system: EuiThemeBorealis,
modifications: {},
colorMode: DEFAULT_COLOR_MODE,
highContrastMode: false
};
export var EuiSystemContext = /*#__PURE__*/createContext(DEFAULTS.system);
export var EuiModificationsContext = /*#__PURE__*/createContext(DEFAULTS.modifications);
export var EuiColorModeContext = /*#__PURE__*/createContext(DEFAULTS.colorMode);
export var EuiHighContrastModeContext = /*#__PURE__*/createContext(DEFAULTS.highContrastMode);
export var defaultComputedTheme = getComputed(DEFAULTS.system, DEFAULTS.modifications, DEFAULTS.colorMode);
export var EuiThemeContext = /*#__PURE__*/createContext(defaultComputedTheme);
export var EuiNestedThemeContext = /*#__PURE__*/createContext({
isGlobalTheme: true,
hasDifferentColorFromGlobalTheme: false,
bodyColor: '',
colorClassName: '',
setGlobalCSSVariables: function setGlobalCSSVariables() {},
setNearestThemeCSSVariables: function setNearestThemeCSSVariables() {}
});