import * as React from 'react';
export const ChildrenWithProp = (children, props) => children ? React.Children.map(children, (child, index) => {
if (typeof children.type === 'string') {
props = {};
}
return React.cloneElement(child, Object.assign({ index }, props));
}) : null;