react-curry
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -17,4 +17,4 @@ 'use strict'; | ||
return function (props) { | ||
return typeof ComponentOrElementName === 'string' ? _react2.default.createElement(ComponentOrElementName, (0, _ramda.mergeDeepLeft)(preProps, props)) : _react2.default.createElement(ComponentOrElementName, (0, _ramda.mergeDeepLeft)(preProps, props)); | ||
return typeof ComponentOrElementName === 'string' ? _react2.default.createElement(ComponentOrElementName, (0, _ramda.mergeDeepRight)(preProps, props)) : _react2.default.createElement(ComponentOrElementName, (0, _ramda.mergeDeepRight)(preProps, props)); | ||
}; | ||
}; |
{ | ||
"name": "react-curry", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "react stateless component curry", | ||
@@ -5,0 +5,0 @@ "main": "./lib2/index.js", |
import React from 'react'; | ||
import { mergeDeepLeft } from 'ramda'; | ||
import { mergeDeepRight } from 'ramda'; | ||
export default (ComponentOrElementName, preProps) => (props) => | ||
export default (ComponentOrElementName, preProps) => props => | ||
(typeof ComponentOrElementName === 'string') | ||
? React.createElement(ComponentOrElementName, mergeDeepLeft(preProps, props)) | ||
: <ComponentOrElementName {...mergeDeepLeft(preProps, props)} /> | ||
? React.createElement(ComponentOrElementName, mergeDeepRight(preProps, props)) | ||
: <ComponentOrElementName {...mergeDeepRight(preProps, props)} /> |
44026