'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var React__default = /*#__PURE__*/_interopDefault(React);

var getCorrectHeight = function getCorrectHeight(listMaxHeight) {
  if (Number.isNaN(Number(listMaxHeight))) {
    return listMaxHeight.toString();
  }
  return "".concat(listMaxHeight, "rem");
};
var childrenWithProps = function childrenWithProps(children, additionalProps) {
  return React.Children.map(children, function (child) {
    if (/*#__PURE__*/React__default.default.isValidElement(child)) {
      return /*#__PURE__*/React__default.default.cloneElement(child, additionalProps);
    }
    return child;
  });
};

exports.childrenWithProps = childrenWithProps;
exports.getCorrectHeight = getCorrectHeight;
