"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
// 将 jsx 的 style 小驼峰的 key 属性，转化为 cssText 的 -
var convertCamelToCSS = function convertCamelToCSS(style) {
  var cssText = '';
  for (var property in style) {
    if (style.hasOwnProperty(property)) {
      var value = style[property];
      if (value && typeof value === 'number' && !isNaN(value)) {
        value = value + 'px';
      }
      var cssProperty = property.replace(/([A-Z])/g, '-$1').toLowerCase();
      cssText += "".concat(cssProperty, ": ").concat(value, "; ");
    }
  }
  return cssText;
};
var _default = exports["default"] = convertCamelToCSS;
//# sourceMappingURL=convertCamelToCSS.js.map
