UNPKG

@kalamazoo/theme

Version:
23 lines 879 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // ideally this would be fetched from ../constants but that causes a // circular dep loop. This will be refactored as part of a breaking // change in the future. var DEFAULT_THEME_MODE = 'light'; // Resolves the different types of theme objects in the current API function getTheme(props) { if (props && props.theme) { // Theme is the global Atlaskit theme if ('__ATLASKIT_THEME__' in props.theme) { return props.theme.__ATLASKIT_THEME__; } // User has provided alternative modes else if ('mode' in props.theme) { return props.theme; } } // If format not supported (or no theme provided), return standard theme return { mode: DEFAULT_THEME_MODE }; } exports.default = getTheme; //# sourceMappingURL=getTheme.js.map