66 lines
2.0 KiB
JavaScript
66 lines
2.0 KiB
JavaScript
"use strict";
|
|
|
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
var _internal = require("../../theme/internal");
|
|
var _style = require("../../style");
|
|
const genStatisticStyle = token => {
|
|
const {
|
|
componentCls,
|
|
marginXXS,
|
|
padding,
|
|
colorTextDescription,
|
|
statisticTitleFontSize,
|
|
colorTextHeading,
|
|
statisticContentFontSize,
|
|
statisticFontFamily
|
|
} = token;
|
|
return {
|
|
[`${componentCls}`]: (0, _extends2.default)((0, _extends2.default)({}, (0, _style.resetComponent)(token)), {
|
|
[`${componentCls}-title`]: {
|
|
marginBottom: marginXXS,
|
|
color: colorTextDescription,
|
|
fontSize: statisticTitleFontSize
|
|
},
|
|
[`${componentCls}-skeleton`]: {
|
|
paddingTop: padding
|
|
},
|
|
[`${componentCls}-content`]: {
|
|
color: colorTextHeading,
|
|
fontSize: statisticContentFontSize,
|
|
fontFamily: statisticFontFamily,
|
|
[`${componentCls}-content-value`]: {
|
|
display: 'inline-block',
|
|
direction: 'ltr'
|
|
},
|
|
[`${componentCls}-content-prefix, ${componentCls}-content-suffix`]: {
|
|
display: 'inline-block'
|
|
},
|
|
[`${componentCls}-content-prefix`]: {
|
|
marginInlineEnd: marginXXS
|
|
},
|
|
[`${componentCls}-content-suffix`]: {
|
|
marginInlineStart: marginXXS
|
|
}
|
|
}
|
|
})
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
var _default = exports.default = (0, _internal.genComponentStyleHook)('Statistic', token => {
|
|
const {
|
|
fontSizeHeading3,
|
|
fontSize,
|
|
fontFamily
|
|
} = token;
|
|
const statisticToken = (0, _internal.mergeToken)(token, {
|
|
statisticTitleFontSize: fontSize,
|
|
statisticContentFontSize: fontSizeHeading3,
|
|
statisticFontFamily: fontFamily
|
|
});
|
|
return [genStatisticStyle(statisticToken)];
|
|
}); |