@talend/react-bootstrap
Version:
Bootstrap 3 components built with React
14 lines • 457 B
JavaScript
export default function splitComponentProps(props, Component) {
const componentPropTypes = Component.propTypes;
const parentProps = {};
const childProps = {};
Object.entries(props).forEach(([propName, propValue]) => {
if (componentPropTypes[propName]) {
parentProps[propName] = propValue;
} else {
childProps[propName] = propValue;
}
});
return [parentProps, childProps];
}
//# sourceMappingURL=splitComponentProps.js.map