This commit is contained in:
Aevann1 2021-12-13 22:28:32 +00:00
parent 628618df89
commit e031240dff
3749 changed files with 1120848 additions and 1 deletions

View file

@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = transformThemeValue;
function transformThemeValue(themeSection) {
if (['fontSize', 'outline'].includes(themeSection)) {
return value => Array.isArray(value) ? value[0] : value;
}
if (['fontFamily', 'boxShadow', 'transitionProperty', 'transitionDuration', 'transitionDelay', 'transitionTimingFunction', 'backgroundImage', 'backgroundSize', 'backgroundColor', 'cursor', 'animation'].includes(themeSection)) {
return value => Array.isArray(value) ? value.join(', ') : value;
}
if (themeSection === 'colors') {
return value => typeof value === 'function' ? value({}) : value;
}
return value => value;
}