@actinc/dls
Version:
Design Language System (DLS) for ACT & Encoura front-end projects.
33 lines • 1 kB
JavaScript
/**
* Copyright (c) ACT, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import isNumber from 'lodash/isNumber';
import px from "../px";
export var makeShadow = function (xOffset, yOffset, blurRadius, spreadRadius, color, inset) {
if (inset === void 0) { inset = false; }
var str = '';
if (inset) {
str = "".concat(str, " inset");
}
if (isNumber(xOffset)) {
str = "".concat(str, " ").concat(px(xOffset));
}
if (isNumber(yOffset)) {
str = "".concat(str, " ").concat(px(yOffset));
}
if (isNumber(blurRadius)) {
str = "".concat(str, " ").concat(px(blurRadius));
}
if (isNumber(spreadRadius)) {
str = "".concat(str, " ").concat(px(spreadRadius));
}
if (color) {
str = "".concat(str, " ").concat(color);
}
return str.trim();
};
export default makeShadow;
//# sourceMappingURL=index.js.map