@netdata/netdata-ui
Version:
netdata UI kit
14 lines • 835 B
JavaScript
export default (function (_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) + ";";
});