UNPKG

@qn-pandora/pandora-visualization

Version:

Pandora 通用可视化库

18 lines (17 loc) 786 B
import { get } from 'lodash'; import { cssVariable as light } from './pandora-light'; import { cssVariable as dark } from './pandora-dark'; import { cssVariable as eleganceGreen } from './pandora-eleganceGreen'; import { themeOptions } from '../../constants'; var opts = [light, dark, eleganceGreen]; var themeForJSMap = themeOptions.reduce(function (styles, theme, index) { styles[theme] = { dashboardColor: get(opts[index], '--dashboardColor'), dashboardBGColor: get(opts[index], '--dashboardBg'), dashboardBlockBgColor: get(opts[index], '--dashboardBlockBg'), layoutBorderColor: get(opts[index], '--dashboardBorderCorder'), titlebarColor: get(opts[index], '--titlebarColor') }; return styles; }, {}); export default themeForJSMap;