Gazebo_simulation-Frontend/node_modules/recompose/mapProps.js

30 lines
874 B
JavaScript
Raw Permalink Normal View History

2020-12-21 11:29:31 -04:00
'use strict';
exports.__esModule = true;
var _react = require('react');
var _setDisplayName = require('./setDisplayName');
var _setDisplayName2 = _interopRequireDefault(_setDisplayName);
var _wrapDisplayName = require('./wrapDisplayName');
var _wrapDisplayName2 = _interopRequireDefault(_wrapDisplayName);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapProps = function mapProps(propsMapper) {
return function (BaseComponent) {
var factory = (0, _react.createFactory)(BaseComponent);
var MapProps = function MapProps(props) {
return factory(propsMapper(props));
};
if (process.env.NODE_ENV !== 'production') {
return (0, _setDisplayName2.default)((0, _wrapDisplayName2.default)(BaseComponent, 'mapProps'))(MapProps);
}
return MapProps;
};
};
exports.default = mapProps;