injectContextAsProp.js 249 Bytes
Newer Older
Sangjune Bae's avatar
Sangjune Bae committed
1
2
3
4
5
6
7
8
import mapContextToProps from './mapContextToProps';
export default (function (Context, prop, Component) {
  return mapContextToProps(Context, function (context) {
    var _ref;

    return _ref = {}, _ref[prop] = context, _ref;
  }, Component);
});