UNPKG

@awsui/components-react

Version:

AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A

21 lines (20 loc) 709 B
import { AceModes } from './ace-modes'; var DEFAULT_LIGHT_THEME = 'dawn'; var DEFAULT_DARK_THEME = 'tomorrow_night_bright'; export function getDefaultConfig() { return { behavioursEnabled: true, theme: getAceTheme(getDefaultTheme()) }; } export function getDefaultTheme() { var isDarkMode = !!document.querySelector('.awsui-dark-mode'); return isDarkMode ? DEFAULT_DARK_THEME : DEFAULT_LIGHT_THEME; } export function getAceTheme(theme) { return "ace/theme/" + theme; } export function getLanguageLabel(language) { var _a; return ((_a = AceModes.filter(function (mode) { return mode.value === language; })[0]) === null || _a === void 0 ? void 0 : _a.label) || ''; }