# All files / extensions childrenWithProps.js

0% Statements 0/2
100% Branches 0/0
0% Functions 0/2
0% Lines 0/2

    1
    2
    3
    4
    5
    6
    7
    8

     import React from 'react';
    import { omit } from 'lodash';

    export default (props, extraProps) =>
      React.Children.map(props.children, child =>
        React.cloneElement(child, { ...omit(props, 'children'), ...extraProps }),
      );