UNPKG

@netdata/netdata-ui

Version:

netdata UI kit

18 lines (17 loc) 933 B
"use strict"; exports.__esModule = true; exports["default"] = void 0; var _default = exports["default"] = function _default(_ref) { var baseUnit = _ref.theme.constants.SIZE_SUB_UNIT, width = _ref.width; if (typeof width === "object") { var _width$min = width.min, min = _width$min === void 0 ? "" : _width$min, _width$max = width.max, max = _width$max === void 0 ? "" : _width$max, _width$base = width.base, base = _width$base === void 0 ? "" : _width$base; return "\n " + (min && "min-width: " + (typeof min === "number" ? baseUnit * min + "px" : min) + ";") + "\n " + (max && "max-width: " + (typeof max === "number" ? baseUnit * max + "px" : max) + ";") + "\n " + (base && "width: " + (typeof base === "number" ? baseUnit * base + "px" : base) + ";") + "\n "; } return width && "width: " + (typeof width === "number" ? baseUnit * width + "px" : width) + ";"; };