Initial commit
This commit is contained in:
19
node_modules/react-bootstrap/es/utils/splitComponentProps.js
generated
vendored
Normal file
19
node_modules/react-bootstrap/es/utils/splitComponentProps.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import _Object$entries from "@babel/runtime-corejs2/core-js/object/entries";
|
||||
export default function splitComponentProps(props, Component) {
|
||||
var componentPropTypes = Component.propTypes;
|
||||
var parentProps = {};
|
||||
var childProps = {};
|
||||
|
||||
_Object$entries(props).forEach(function (_ref) {
|
||||
var propName = _ref[0],
|
||||
propValue = _ref[1];
|
||||
|
||||
if (componentPropTypes[propName]) {
|
||||
parentProps[propName] = propValue;
|
||||
} else {
|
||||
childProps[propName] = propValue;
|
||||
}
|
||||
});
|
||||
|
||||
return [parentProps, childProps];
|
||||
}
|
||||
Reference in New Issue
Block a user