UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

36 lines (31 loc) 956 B
import isBoolean from 'lodash/isBoolean'; import isObject from 'lodash/isObject'; import { getConfig as getDataSetConfig } from 'choerodon-ui/dataset'; export function isCustomizable(target) { return isObject(target); } export function getConfig(key) { return getDataSetConfig(key); } export function getPrefixCls(suffixCls, customizePrefixCls) { if (customizePrefixCls) { return customizePrefixCls; } return "".concat(getConfig('prefixCls'), "-").concat(suffixCls); } export function getProPrefixCls(suffixCls, customizePrefixCls) { if (customizePrefixCls) { return customizePrefixCls; } return "".concat(getConfig('proPrefixCls'), "-").concat(suffixCls); } export function getCustomizable(component) { var customizable = getConfig('customizable'); if (isBoolean(customizable)) { return customizable; } if (isCustomizable(customizable)) { return customizable[component]; } } //# sourceMappingURL=utils.js.map