amis-rpc-design/node_modules/antd/lib/theme/themes/shared/genCommonMapToken.js

24 lines
740 B
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = genCommonMapToken;
var _genRadius = _interopRequireDefault(require("./genRadius"));
function genCommonMapToken(token) {
const {
motionUnit,
motionBase,
borderRadius,
lineWidth
} = token;
return Object.assign({
// motion
motionDurationFast: `${(motionBase + motionUnit).toFixed(1)}s`,
motionDurationMid: `${(motionBase + motionUnit * 2).toFixed(1)}s`,
motionDurationSlow: `${(motionBase + motionUnit * 3).toFixed(1)}s`,
// line
lineWidthBold: lineWidth + 1
}, (0, _genRadius.default)(borderRadius));
}