UNPKG

antd-style

Version:

css-in-js solution for application combine with antd v5 token system and emotion

17 lines (16 loc) 684 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ThemeModeContext = void 0; var _react = require("react"); var _matchBrowserPrefers2 = require("../utils/matchBrowserPrefers"); var _matchBrowserPrefers; var ThemeModeContext = exports.ThemeModeContext = /*#__PURE__*/(0, _react.createContext)({ appearance: 'light', setAppearance: function setAppearance() {}, isDarkMode: false, themeMode: 'light', setThemeMode: function setThemeMode() {}, browserPrefers: (_matchBrowserPrefers = (0, _matchBrowserPrefers2.matchBrowserPrefers)('dark')) !== null && _matchBrowserPrefers !== void 0 && _matchBrowserPrefers.matches ? 'dark' : 'light' });